[Python-Dev] Definining properties - a use case for class decorators? (original) (raw)
Michele Simionato michele.simionato at gmail.com
Mon Oct 24 10:33:18 CEST 2005
- Previous message: [Python-Dev] Definining properties - a use case for class decorators?
- Next message: [Python-Dev] Definining properties - a use case for class decorators?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Definining properties - a use case for class decorators?
- Next message: [Python-Dev] Definining properties - a use case for class decorators?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]