Nick Coghlan wrote:
On Tue, Jun 5, 2012 at 8:58 AM, PJ Eby wrote:
The reason for wanting this to be transparent is that 1) if you forget the
redundant class-decorator, mixin, or metaclass, stuff will silently not
work,
Why would it silently not work? What's preventing you from having
decorators that create wrapped functions that fail noisily when
called, then providing a class decorator that unwraps those functions,
fixes them up with the class references they need and stores the
unwrapped and updated versions back on the class.
You call it redundant, I call it explicit.
The first time you specify something, it's explicit; if you have to
specify the same thing a second time, it's redundant; if this was a
good thing why do we say DRY so often?
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com