the address of list.append and list.append.__doc__

HYRY ruoyu0088 at gmail.com
Tue Sep 25 22:54:18 EDT 2007


I have the following questions, I am using Python 2.4.2

>>> a = [1,2,3]
>>> id(a.append)
19167152           #1
>>> id(list.append)
11306608           #1

1. the address of a.append and list.append is different, can I get the
address of list.append from a.append?


>>> id(a.append.__doc__)
19162720
>>> id(a.append.__doc__)
19162336
>>> id(a.append.__doc__)
19162592
>>> id(a.append.__doc__)
19162720
>>> id(list.append.__doc__)
19162336
>>> id(list.append.__doc__)
19162720
>>> id(list.append.__doc__)
19162592
>>> id(list.append.__doc__)
19162336
2. why the address of a.append.__doc__ and list.append.__doc__ change,
this means __doc__ is not a normal string, but something return a
string.




More information about the Python-list mailing list