Does Python really follow its philosophy of "Readability counts"?
Paul Rubin
http
Wed Jan 14 22:12:16 EST 2009
Bruno Desthuilliers <bdesth.quelquechose at free.quelquepart.fr> writes:
> > We're not talking about libraries here.
>
> Yes we are. If the default is "non-dynamic", then a class author is in
> charge of explicitely allowing it when *he* see fits.
Oh, I see what you mean, the standard libraries would be affected if
the language default were to tone down the dynamism. True.
> As long as it's up to the *user* to choose, that's ok. Your "@dynamic"
> class decorator doesn't have the same implications.
Well, you could use it on library classes too:
from library import Libclass
Libclass = dynamic(Libclass)
...
would be like using the decorator on the class definition.
More information about the Python-list
mailing list