Avoiding local variable declarations?
dpapathanasiou
denis.papathanasiou at gmail.com
Thu Nov 13 15:50:09 EST 2008
> Any time you port between languages, it's rarely a good idea to just
> convert code verbatim. For example:
>
> import random, string
> def random_char():
> return random.choice(string.ascii_letters + string.digits)
Good point, and thanks for the idiomatic Python example (I like the
conciseness); I'm still wrapping my mind around how Python statements
should be constructed.
More information about the Python-list
mailing list