Are decorators really that different from metaclasses...
Steven Bethard
steven.bethard at gmail.com
Thu Sep 2 11:48:19 EDT 2004
Jeff Epler <jepler <at> unpythonic.net> writes:
> On the other hand, looking at examples where the names have no meaning
> seems relevant to me, because it shows just how much complication you've
> added, and how much currently legal code would have its meaning changed
> under your proposal.
Not to defend Paul's proposal, which I, like many others on this list, still
find counterintuitive and a break with the current syntax/semantics of Python,
but I don't think it's fair to say that his proposal will change much
currently legal code. Grep the Python source for functions with __*__ local
variable assignments and tell me how many you find. I wasn't able to find
any, though perhaps my skills with grep are not up to par... For that matter,
grep any Python source for functions like this. I'd bet you find the same.
Certainly, Paul's proposal would change what code is legal, but I don't think
it would actually make much current Python code illegal -- no one codes like
this! Which is probably why it seems so counterintuitive to me...
Steve
More information about the Python-list
mailing list