Help understanding the decisions *behind* python?
Piet van Oostrum
piet at cs.uu.nl
Mon Jul 20 19:41:16 EDT 2009
>>>>> Paul Moore <p.f.moore at gmail.com> (PM) wrote:
>PM> 2009/7/20 Chris Rebert <clp2 at rebertia.com>:
>>> On Mon, Jul 20, 2009 at 2:23 PM, Piet van Oostrum<piet at cs.uu.nl> wrote:
>>>>>>>>> x = [2,1,3]
>>>>>>>>> print sorted(x)[0]
>DB> 3
>>>>
>>>> What kind of Python produces that?
>>>
>>> Assuming you're referring to the latter example, it was added in version 2.4
>>> If you meant the former example, I think that's purely pseudo-Python.
>PM> I think he was referring to the fact that the result should be 1, not 3.
The underlying thought was that you should copy and paste examples from
a real Python interpreter.
--
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