[Python-Dev] Re: Call for defense of @decorators
Terry Reedy
tjreedy at udel.edu
Thu Aug 5 22:48:06 CEST 2004
More information about the Python-Dev mailing list
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 >veryLong_andSometimesAlsoVeryUgly_methodNames_. 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 saveSheetDidDismiss_returnCode_contextInfo_(self, sheet, > returnCode, contextInfo): > pass > saveSheetDidDismiss_returnCode_contextInfo_ = > objc.selector(saveSheetDidDismiss_returnCode_contextInfo_, > 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 ]
More information about the Python-Dev mailing list