[Python-Dev] Definining properties - a use case for class decorators?

Michele Simionato michele.simionato at gmail.com
Mon Oct 24 10:33:18 CEST 2005

On 10/24/05, Josiah Carlson <jcarlson at uci.edu> wrote:
> I would criticise it for being dangerously close to worthless.  With the
> minor support code that I (and others) have offered, no new syntax is
> necessary.
> You can get the same semantics with...
> class NAME(_(TYPE), ARGS):
>     BLOCK
> And a suitably defined _.  Remember, not every X line function should be
> made a builtin or syntax.
>  - Josiah

Could you re-read my original message, please? Sugar is *everything*
in this case. If the functionality is to be implemented via a __metaclass__
hook, then it should be considered a hack that nobody in his right mind
should use. OTOH, if there is a specific syntax for it, then it means
this the usage
has the benediction of the BDFL. This would be a HUGE change.
For instance, I would never abuse metaclasses for that, whereas I
would freely use a 'create' statement.

       Michele Simionato

More information about the Python-Dev mailing list