On 26/04/2013 2:38 p.m., Guido van Rossum wrote: > Can't we do some kind of callable check? There may be some weird > decorators that won't work, but they aren't likely to be useful in > this context. Another possible solution: class Color: red = 1 white = 2 blue = 3 orange = 4 class __methods__: def wave(self, n=1): for _ in range(n): print('Waving', self) and have the metaclass pull the functions out of the __methods__ sub-object. -- Greg
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