"Jewett, Jim J" <jim.jewett at eds.com>: > With the current syntax, I think the cost is too high > for the benefit. It might help to add a keyword, like > > def foo() wrapped_by [sugary, syntax, list]: Some keyword might help, but I don't like that particular choice, as it draws too much attention to the mechanism, which is not the important thing to be thinking about when reading the code. Consider def marmalade(self) wrapped_by [classmethod]: ... That's wrong -- marmalade isn't wrapped by a class method, it *is* a class method. I think it ought to be very readable without any keyword, provided the names of the wrapper functions are chosen appropriately. Can you honestly say that, as a Python newbie, if you had come across def marmalade(self) [classmethod]: ... you wouldn't have been able to guess the intent, if not the mechanism being used to achieve it? Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
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