[Python-Dev] Re: Call for defense of @decorators (original) (raw)
Terry Reedy tjreedy at udel.edu
Thu Aug 5 22:48:06 CEST 2004
- Previous message: [Python-Dev] Call for defense of @decorators
- Next message: [Python-Dev] Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Ronald Oussoren"
My particular use-case is PyObjC, which sometimes suffers from haveing veryLongandSometimesAlsoVeryUglymethodNames. Having to repeat those three times when using a decorator is no fun.
I did not get this at first (see below). I believe you mean more specifically "Having to repeat those three times when using the old no-special-deco-syntax post call is no fun."
"Bob Ippolito" followed with
The alternative would be (current syntax and current PyObjC) this:
def saveSheetDidDismissreturnCodecontextInfo(self, sheet, returnCode, contextInfo): pass saveSheetDidDismissreturnCodecontextInfo = objc.selector(saveSheetDidDismissreturnCodecontextInfo, signature='v@:@i')
Aha! Now I get it (perhaps for the second time in an extended discussion).
One argument for extended assignment was and is that not writing names, especially long names, twice makes for easier reading and fewer bugs. The argument for not writing names three times, is even stronger. If this rationale against the status quo (which many objectors on c.l.py favor) is not currently in the pep, I think it should be.
Terry J. Reedy
- Previous message: [Python-Dev] Call for defense of @decorators
- Next message: [Python-Dev] Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]