[docs] Small problem with the pop function reference
tarpeyjb at gmail.com
tarpeyjb at gmail.com
Thu Sep 19 07:08:54 CEST 2013
In the table at
http://docs.python.org/3/library/stdtypes.html#mutable-sequence-types
s.pop([i]) is shown, which is incorrect. s.pop(i) is the proper
example:
>>> s = [1, 2, 3]
>>> s.pop([0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'list' object cannot be interpreted as an integer
>>> s = [1, 2, 3]
>>> s.pop(0)
1
More information about the docs
mailing list