On 26-feb-04, at 3:56, Josiah Carlson wrote: >> Just a data point from a user: I use classmethod fairly frequently, >> and >> I would *love* to see some syntax to support it. As has been pointed >> out before, classmethod (and staticmethod) are a part of the interface >> of a function, and shouldn't be tacked on to the end of the body. >> Please let me put them where people (and hopefully pydoc and >> pychecker) >> can easily see them. > > I personally don't see the point of using any syntax for wrapping a > function like so: > > class a: > def funct(self): > pass > a = classmethod(a) Not that I have anything usefull to add, but ... I find the proposed syntax easier to understand than the current alternative, even for short functions. In "def foo(self) [classmethod]: pass" the [classmethod] part feels like an anotation/declaration, while "foo = classmethod(foo)" has a more magical feel. I'd expect at least as much newbe questions about the current idiom than about the alternatives. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173
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