[Python-Dev] Definining properties - a use case for class decorators? (original) (raw)
Michele Simionato michele.simionato at gmail.com
Mon Oct 24 13:41: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, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
I'd say using a class statement to define a property is metaclass abuse, as would anything that wouldn't define something class-like. The same is true for other constructs, using an decorator to define something that is not a callable would IMHO also be abuse.
+1
That said, I really have an opinion on the 'create' statement proposal yet. It does seem to have a very limited field of use.
This is definitely non-true. The 'create' statement would have lots of applications. On top of my mind I can think of 'create' applied to:
- bunches;
- modules;
- interfaces;
- properties;
- usage in framewors, for instance providing sugar for Object-Relational mappers, for making templates (i.e. a create HTMLPage);
- building custom minilanguages;
- ...
This is way I see a 'create' statement is frightening powerful addition to the language.
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 ]