[Python-Dev] PEP 318: Suggest we drop it (original) (raw)
Kevin J. Butler python-kbutler at sabaydi.com
Wed Aug 18 23:33:14 CEST 2004
- Previous message: [Python-Dev] PEP 318: Can't we all just get along?
- Next message: [Python-Dev] PEP 318: Suggest we drop it
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- There is no universally liked syntax (or even a universally tolerable syntax)
- decorators will incosistently retain or drop docstrings (this may even be the most appropriate thing to do)
- a "decorated" function may have an arbitrarily distant relationship with the function as implemented in the def statement (this is a killer)
- if you want to decorate a single function two separate ways, you're back to 2.3 syntax - say, one that logs, checks parameters, etc., and the "internal" optimal version. None of the decorator syntaxes facilitate this.
Because of all these issues, I think we should drop PEP 318.
The 2.3 form seems more reasonable all the time:
def __func( self ): pass spanishInquisition = mydecorator( __func ) spanishInquisition.doc= """Something unexpected"""
parrot = otherdecorator( __func ) parrot.doc = """And now for something completely different"""
Are any of the syntaxes enough better to justify the irritation or divisiveness of including it?
Syntactic sugar causes cancer of the semicolon, indeed...
kb
- Previous message: [Python-Dev] PEP 318: Can't we all just get along?
- Next message: [Python-Dev] PEP 318: Suggest we drop it
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]