At 07:53 AM 7/31/03 -0700, Pat Miller wrote: >Michael wrote: >>I don't object to a syntax for function attributes... in fact, I've seen no >>specific proposal to object to. But I find your point above HIGHLY >>unconvincing: > >I use the classmethod call because its the only (good) way to do >the task, but I have the same objection. When I write > >class Foo: > def method(self, ...): > ... > > method = classmethod(method) > > >Upon reading, I don't find out the "true meaning" of the method until I >happen upon the classmethod call. I agree with the need to put information about a method near the definition, but I don't think that we need a separate syntax specifically for function attributes. I think that with PEP 318 or some variant thereof, it is trivial to create an 'attrs(foo=bar, baz=spam)' function that can be used as a decorator, eg. in conjunction with classmethod.
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