self-promotion of the decorator module

Michele Simionato michele.simionato at gmail.com
Thu May 19 06:51:45 EDT 2005


Duncan Booth:
> Fortunately you have a list of
> argument names readily available so it shouldn't be too
> hard to generate unique names to use in their place.

It does not look too simple either. Whereas I can easily
build valid Python identifiers which are extremely unlikely
to clash with any identifier I can have in my program, it
seems impossible to get an identifier which cannot be
shadowed later . What about renaming
name-> _name_, call -> _call_, func-> _func_, defarg->_defarg_ and
checking that the argument list
does not contain such reserved names by means of an assert statement?

                 Michele Simionato




More information about the Python-list mailing list