Michael Tobis wrote:
I'm trying to do metaprogramming. I'm sure I've got this all wrong
wrong wrong, but somehow my approach hasn't yet hit a brick wall.
Anyway, I'd like to dynamically add a method to an instance at
instantiation time. Something like
##
In [71]: class quux(object):
: d
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'd like to dynamically add a method to an instance at
> instantiation time.
No can do. A method is function that is an attribute of a class, even if
accessed via an instance. A function added to an instance as an
Michael Tobis wrote:
Anyway, I'd like to dynamically add a method to an instance at
instantiation time. Something like
Nearly identical question from yesterday and a series of answers:
http://mail.python.org/pipermail/python-list/2005-January/263024.html
Steve
--
http://mail.python.org/mailman/list
I'm trying to do metaprogramming. I'm sure I've got this all wrong
wrong wrong, but somehow my approach hasn't yet hit a brick wall.
Anyway, I'd like to dynamically add a method to an instance at
instantiation time. Something like
##
In [71]: class quux(object):
: def __init__(self,st