Why does Python show the whole array?
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Thu Apr 9 04:29:21 EDT 2009
On Thu, 09 Apr 2009 18:53:13 +1200, Lawrence D'Oliveiro wrote:
> This is why conditional constructs should not accept any values other
> than True and False.
I once tried this:
for i in alist.sort():
and got an error I didn't understand because I failed to read the docs.
Clearly for loops shouldn't take sequences but only an integer count,
because that would have prevented my error.
--
Steven
More information about the Python-list
mailing list