On 7 April 2013 10:50, Helmut Jarausch <jarau...@skynet.be> wrote: > Hi, > > I'm trying to port a class to Python3.3 which contains > > class Foo : > .... > def to_binary(self, *varargs, **keys): > .... > > .... > self.to_binary = new.instancemethod(to_binary, self, self.__class__)
`self` isn't bound in this lexical scope (the class scope). Or is your indentation incorrect? However, if this statement was within the `to_binary` method, then `to_binary` wouldn't be bound so I can't make a reasonable guess. > # Finally call it manually > return apply(self.to_binary, varargs, keys) > [...] -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list