Loop and the list

Peter Otten __peter__ at web.de
Fri May 14 11:54:55 EDT 2004


Krzysztof Szynter wrote:

> anton muhin <antonmuhin at rambler.ru> wrote in news:2gk3eeF3gha1U1 at uni-
> berlin.de:
> 
>> >> max([1, 2, 3])
>> 3
> 
> It works. Sometimes.

It just works. 

>>> max([1,2,3])
3

Until you rebind it:

>>> max = 123
>>> max([1,2,3])
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: 'int' object is not callable
>>>

Peter




More information about the Python-list mailing list