Looking for the best way to translate an idiom

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun Dec 14 14:20:40 EST 2008


Steve Holden a écrit :
> Bruno Desthuilliers wrote:
> [...]
>> if you only want the first returned value, you can just apply a slice:
>>
>> def f():
>>    return 1,2,3
>>
>> a = f()[0] + 1
>>
> <nit>That isn't a slice, it's indexing</nit>

Yeps, sorry - and thanks for the correction.



More information about the Python-list mailing list