[Python-Dev] Definining properties - a use case for class decorators?
Steven Bethard
steven.bethard at gmail.com
Wed Oct 19 17:38:12 CEST 2005
Michele Simionato wrote:
> This reminds me of an idea I have kept in my drawer for a couple of years or so.
> Here is my proposition: we could have the statement syntax
>
> <callable> <name> <tuple>:
> <definitions>
>
> to be syntactic sugar for
>
> <name> = <callable>(<name>, <tuple>, <dict-of-definitions>)
>
[snip]
> BTW, if the proposal was implemented, the 'class' would become
> redundant and could be replaced by 'type':
>
> class <classname> <bases>:
> <definitions>
>
> <=>
>
> type <classname> <bases>:
> <definitions>
Wow, that's really neat. And you save a keyword! ;-)
I'd definitely like to see a PEP.
STeVE
--
You can wordify anything if you just verb it.
--- Bucky Katt, Get Fuzzy
More information about the Python-Dev
mailing list