lint warnings

Andrea Crotti andrea.crotti.0 at gmail.com
Tue Feb 15 04:21:08 EST 2011


Il giorno 15/feb/2011, alle ore 04.10, Ben Finney ha scritto:

> Andrea Crotti <andrea.crotti.0 at gmail.com> writes:
> The ‘map’ builtin is deprecated; using a list comprehension is neater
> and more efficient.

Ok well it depends,
map(int, biglist)
is better than:
[int(x) for x in biglist]
at least for me.

Efficiency is probably not a big issue apparently, and it's really not important
until I see that this is a bottleneck.

> 
> It makes the code unnecessarily ambiguous; the person reading the code
> can't tell that it's a relative import.

Yes but what if I move those two files (parameter and the importing module)
away, the import will continue to work if it's not relative to the upper directory.




More information about the Python-list mailing list