Re: bound vs unbound functions

2005-01-29 Thread Kent Johnson
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

{Spam?} Re: bound vs unbound functions

2005-01-29 Thread Terry Reedy
"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

Re: bound vs unbound functions

2005-01-29 Thread Steven Bethard
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

bound vs unbound functions

2005-01-29 Thread Michael Tobis
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