Help understanding the decisions *behind* python?

Piet van Oostrum piet at cs.uu.nl
Mon Jul 20 17:23:25 EDT 2009


>>>>> Duncan Booth <duncan.booth at invalid.invalid> (DB) wrote:

>DB> Phillip B Oldham <phillip.oldham at gmail.com> wrote:
>>> This make a lot more sense to us, and follows the convention from
>>> other languages. It would also mean chaining methods to manipulate
>>> lists would be easier:
>>> 
>>>>>> x = [2,1,3]
>>>>>> print x.sort()[0]
>>> 3
>>>>>> print x
>>> [2,1,3]

>DB> You already have a way to do what you want:

>>>>> x = [2,1,3]
>>>>> print sorted(x)[0]
>DB> 3

What kind of Python produces that?
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list