Yeah. I was really surprised to see this as a feature to be used rather than a gotcha. I've seen it more as gotchas, as in actual bugs introduced because of this behavior, and never as a feature until now. I can see why he thinks it's useful though and, maybe within his specific context, it is. That said, even for his example, I think he would have been better off using https://docs.python.org/3/library/functools.html#functools.c...
> You don't actually need that though - there is a completely obvious way to write stuff without having to use that line.
Can you elaborate on that point? I thought that was the canonical way to do exactly that... http://docs.python.org/library/__main__.html. If there's an easier/less verbose method (pun not intended) I'd love to know about it.
http://legacy.python.org/dev/peps/pep-3102/
Like I said, it's a small reason, but it would have made my life much easier today. Enough small reasons add up.
reply