Efficient python programming...

gabor gabor at realtime.sk
Fri Jun 7 00:15:52 EDT 2002


ok,

so you need general programming advices?

then by a book about programming or something like that....

but if you want to know about specific python issues, then you have to
learn things like "dictionary are very well optimized etc.."

those things doesn't make your code obfuscated..

for file in directory:
	file.printsize()


ran = range(len(directory))
for r in ran:
	directory[r].printsize()

[file.printsize() for file in directory]

they're the same, and everyone would recommend you the last one..

it's python specific, but it won't make your code obfuscated..


so to summarize this: what do you want to know/learn?

bye,
gabor


 On Thu, Jun 06, 2002 at 08:40:15PM +0200, Shagshag13 wrote:
 >  (not the kind of thing which made you an obfuscated python nerd,
 > but that "map" should be preferred to "for in loop" if possible, that
 > dictionary are very well optimized, etc.)







More information about the Python-list mailing list