>> I think "adorn" would make a better keyword in that case, as in >> "adorn with" this decorator the method foo. Bob> I don't think that's appropriate at all. Most decorators are Bob> transformations that change the function object into something else Bob> entirely, most likely by wrapping it but quite possibly not. Correctamundo. In fact, there's no need that the decorator return a function (or callable) object at all. You could define a function to compute a lookup table of some sort. The decorator might simply invoke the function and return its value. Perfectly legal. Slightly more than adornment. Somewhat silly example: def define(func): return func() @ define def grayscale(): table = [] for i in range(256): table.append((i,i,i)) return table Skip
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