Multi-argument append() is illegal
Hrvoje Niksic
hniksic at iskon.hr
Mon Mar 27 03:51:33 EST 2000
Toby Dickenson <mbel44 at dial.pipex.net> writes:
> Is there a complete list of every method that has been fixed by this
> patch? Im now having nightmares about _every_ variable-paramater-list.
>
> In particular,
>
> Python 1.5.2 (#0, Oct 11 1999, 09:59:20) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> max(1,2,3,4,5)
> 5
> >>> max([1,2,3,4,5])
> 5
>
> That one even looked like a bug what I first saw it, which I cant
> say about list.append.
On the contrary, this one documented and thus a feature:
`max(s[, args...])'
With a single argument S, return the largest item of a non-empty
sequence (e.g., a string, tuple or list). With more than one
argument, return the largest of the arguments.
Not that I like it. I hate it when somebody complexifies a function
because he was too lazy to call `apply'.
More information about the Python-list
mailing list