[reportlab-users] Two Generic Questions

Ben Finney bignose+hates-spam at benfinney.id.au
Tue Oct 30 18:59:26 EDT 2007


Rich Shepard <rshepard at appl-ecosys.com> writes:


> On Tue, 30 Oct 2007, Tim Roberts wrote:

> > [Avoiding "import everything from foo" is] just good Python

> > practice. Almost any time you see this:

> >

> > from anothermodule import *

> >

> > it is a bad practice.

>

> Hmmm-m-m. There seems to be nothing wrong with

> import wx

> or

> import matplotlib

>

> but, I'll accept your explanation, Tim.


Those are fundamentally different; they're not "import everything from
foo", as your original post was asking about, but instead are "import
foo as-is in its own namespace". That makes all the difference, since
in the latter case it will still be clear where names come from when
reading the code.

--
\ "Say what you will about the Ten Commandments, you must always |
`\ come back to the pleasant fact that there are only ten of |
_o__) them." -- Henry L. Mencken |
Ben Finney



More information about the reportlab-users mailing list