A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-October/057445.html below:

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

[Python-Dev] Definining properties - a use case for class decorators? [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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4