[issue20381] Argument Clinic: expression default arguments broken

Larry Hastings report at bugs.python.org
Fri Jan 24 22:41:47 CET 2014


Larry Hastings added the comment:

Let's not catch Exception there.  Does catching NameError make the problem go away?

And, #20189 changed the rules for simple expressions.  Now names you want from the local module should not have the name of the module in front.  You wouldn't have to do this in foo.py:
     
    IMPORTANT_SYMBOLIC_CONSTANT=83
    def fn(a=foo.IMPORTANT_SYMBOLIC_CONSTANT): ...

So it was always a dumb idea to require it for Argument Clinic code too.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20381>
_______________________________________


More information about the Python-bugs-list mailing list