Eschew obfuscation (was: Want to reduce steps of an operation with dictionaries)
bignose+hates-spam at benfinney.id.au
Wed Oct 25 08:12:49 CEST 2006
Fredrik Lundh <fredrik at pythonware.com> writes:
> Ben Finney wrote:
> >> How can I do this with one line of instruction?
> > As a general piece of advice, [...] Don't try to compress things
> > into fewer lines unless that actually makes it clearer to read.
> I was about to suggest adding something along these lines to "import
> this", but then I realized that it had to be written on one line to
> fit into that module, so I dropped the idea.
Lines of code are not a scarce resource; use as many as you need.
\ "Outside of a dog, a book is man's best friend. Inside of a |
`\ dog, it's too dark to read." -- Groucho Marx |
More information about the Python-list