[David Handy]
> I had a program fail on me today because the following didn't 
> work as I expected:
> 
> >>> class C:
> ...     def f(self):
> ...         pass
> ...
> >>> c = C()
> >>> m = c.f
> >>> m is c.f
> False
[...]
> The workaround really awkward:

What's wrong with this?

>>> class C:
...     def f(self):
...             pass
...     def g(self):
...             pass
...     
>>> c = C()
>>> m = c.f
>>> m == c.f
True
>>> m == c.g
False

=Tony.Meyer

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to