oripel wrote: > I'm trying to attach some attributes to functions and methods, similar > to Java annotations and .NET attributes. > ... > Assigning attributes to the function will work, as will assigning keys > and values to a dictionary in an attribute. But if there are more > decorators in the way, this could fail: > > @onedec > @attr(...) > @twodec > def foo(): > ... > > Given 'foo' now, how do I find the attributes? > ... > Any thoughts? Am I rehashing something old that my search skills didn't > uncover?
There are past discussions about this; google for "python-dev decorator metadata". For example: http://thread.gmane.org/gmane.comp.python.devel/77506/focus=77507 Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list