anonymous assignment

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Tue May 13 03:22:05 EDT 2008


On Tue, 13 May 2008 03:25:51 +0000, Yves Dorfsman wrote:

> Marc 'BlackJack' Rintsch wrote:
>>>>    y, _, d, _, _, _, _, _, _ = time.localtime()
>>> But you still have have a variable that's using memory for nothing. I
>>> find this unsatisfactory...
>> 
>> Get over it…
> 
> Than what's the point of wanting a better language if every time we run in 
> something that looks wrong, or something that could be done better we should 
>   just "get over it" ?

That advice wasn't for every time something looks wrong but this
particular one.  You can solve it with `operator.itemgetter()` but that
means importing another module and calling a function which looks much
more "heavy weight" to me than one reference to an unused object which
might go away at the end of the function anyway soon.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list