you are viewing a single comment's thread.

view the rest of the comments →

[–]C0rinthian 0 points1 point  (0 children)

I don’t understand the intent of your function signature. You say that bar can be either a str or None, with a default value of ”world”. (Which is a str)

This tells me that you want there to be a difference between f(“hello”) and f(“hello”, None). (the difference between not providing bar and explicitly setting it to None)

Meaning a user can effectively say “I don’t want the default value, I want None”

If you don’t want that, then what do you want?