[Python-ideas] Optional parameters without default value

Ethan Furman ethan at stoneleaf.us
Thu Mar 2 11:57:21 EST 2017


On 03/02/2017 08:13 AM, Joao S. O. Bueno wrote:

> Is it just me that find that having the un-assigned parameter raise
> NameError (or other exception) much more cumbersome than
> havign a sentinel-value?

No.  While clever, the hassle of figuring out if you have a parameter clearly outweighs the benefit of avoiding a 
sentinel value.

It would be a different story if we had exception-catching expressions.  ;)

--
~Ethan~





More information about the Python-ideas mailing list