This document is placed in the public domain. This document can
be considered a companion to the tutorial. It shows how to use
Python, and even more importantly, how not to use Python. While
Python has relatively few gotchas compared to other languages,
it still has some constructs which are only useful in corner
cases, or are plain dangerous. from module import * is invalid
inside function definitions. While many versions of Python do
not check for the invalidity, it does not make it more valid, no
more than having a smart lawyer makes a man innocent. Do not use
it like that ever. Even in versions where it was accepted, it
made the function execution slower, because the compiler could
not be certain which names are local and which are global. In
Python 2.1 this construct causes warnings, and sometimes even
errors. While it is valid to use from module import * at module
level it is usually a bad idea. For one, this loses an important
property Python otherwise has — you can know where each toplevel
name is def