decorators vs GIL

Skip Montanaro skip at pobox.com
Tue Aug 10 12:40:52 EDT 2004


    Istvan> I think one of the latent messages of this thread was that
    Istvan> adding new "gratuitous" features to the core language is a bad
    Istvan> thing.

    Istvan> Just because someone sits down and codes it does not mean it
    Istvan> should be added to the language. Features are forever, you
    Istvan> cannot just can't eliminate them in the next version.

    ...

    Istvan> Python is said to come with the batteries included, then
    Istvan> that's where new features should go, to the battery level
    Istvan> not into the wiring.

The notion of decorated functions has been in Python since (at least)
staticmethod and classmethod were added as builtins.  At that time it was
presumed some syntax would be developed in the future to make their use less
clunky (few people like that the "declaration" of a static method occurs at
the end of its body) if it turned out they were useful.  They have been
found to be useful.  We are now in the throes of the effort to define a
suitable syntax for such a construct.

Decorators are not theorhetical features with no proven use.  They are used
today and will likely be used more widely once it is easier to do so.

Skip



More information about the Python-list mailing list