[Python-Dev] str() for interpreter output

Gordon McMillan gmcm@hypernet.com
Fri, 7 Apr 2000 16:12:29 -0400


Ka-Ping Yee wrote:

> repr() must be unambiguous, because the interpreter must help people
> learn by example.

Speaking of which:

>>> class A:
...  def m(self):
...   pass
...
>>> a = A()
>>> a.m
<method A.m of A instance at 7f9b10>
>>> m = a.m
>>> m
<method A.m of A instance at 7f9b10>
>>> m is a.m
0
>>>

ambiguated-ly y'rs

- Gordon