Christian,
Thanks for the example; I'm sorry that I didn't read the docs carefully
enough to realize that I could extract the original function and set the
attribute on that.
- Eli
On Jan 8, 2008 11:49 AM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> The example should shed some light on the p
Eli Courtwright wrote:
> I can tell that instancemethods can't have attributes added to them outside
> of their class definition. Is this part of the Python language spec, or
> just an implementation detail of CPython?
You can't modify the attributes of an instance method. You have to
modify the
Since we're talking about class decorators, I have a question about function
and instancemethod objects. The following code works
class Root(object):
def index(self):
return "Hello World!"
index.exposed = True
but this code
class Root(object):
def index(self):
return "Hel
Christian Heimes schrieb:
> PEP 3107 (function annotation), PEP 3104 (nonlocal) and PEP 3132
> (extended iterable unpacking: a, *b = 1,2,3) are IMHO other useful
> feature for 2.6. nonlocal would require a __future__ import.
I'm planning to work on PEP 3107 (function annotations) after I have
fin
Robin Stocker wrote:
> I'm planning to work on PEP 3107 (function annotations) after I have
> finished backporting PEP 3102 (keyword-only arguments) (issue1745).
Thanks! I've backported class decorators: http://bugs.python.org/issue1759
Could somebody with more knowledge about grammer and ASDL ch
Raymond Hettinger wrote:
> This seems like something that could reasonably be added to Py2.6.
+1 from me
PEP 3107 (function annotation), PEP 3104 (nonlocal) and PEP 3132
(extended iterable unpacking: a, *b = 1,2,3) are IMHO other useful
feature for 2.6. nonlocal would require a __future__ import.