Eric Sumner <kd5bjo at gmail.com> wrote: > Forgive me if someone has already come up with this; I know I am > coming to the party several months late. All of the proposals for > decorators (including the accepted one) seemed a bit kludgey to me, > and I couldn't figure out why. When I read PEP 343, I realized that > they all provide a solution for an edge case without addressing the > larger problem. [snip code samples] > I will readily admit that I have no idea how difficult either of these > suggestions would be to implement, or if it would be a good idea to do > so. At this point, they are just something to think about Re-read the decorator PEP: http://www.python.org/peps/pep-0318.html to understand why both of these options (indentation and prefix notation) are undesireable for a general decorator syntax. The desire for context managers to have access to its enclosing scope is another discussion entirely, though it may do so without express permission via stack frame manipulation. - Josiah
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