[Baypiggies] Baypiggies snippets
Bob Ippolito
bob at redivi.com
Tue Mar 27 11:51:56 CEST 2007
On 3/27/07, Keith Dart <keith at dartworks.biz> wrote:
> On Tue, 27 Mar 2007 02:42:04 -0700
> "Bob Ippolito" <bob at redivi.com> wrote:
>
> > Only if the usage instructions for that framework said to use "from
> > convenience_builtins import *" if you would like the functions to be
> > global. And of course it should work if you explicitly reference the
> > functions from within the module.
>
> Yes, ok. But would you feel the same way if you had just wrote that
> line 100 times?
Yes. EIBTI. I don't want magic crap happening to my built-in namespace
with no code whatsoever.
"import x" is certainly not meaningfully shorter than "from x import
*". If you had to write it 100 times, then it's your own fault for not
using a template. The proposal doesn't actually solve any real
problem.
> Also, I thought "... import *" was "frowned upon". But that's
> fine with you? Otherwise, everyone would have to pick a list to import.
>
> But if importing * is fine, that could very well be preferable.
It's not generally used because tracking where the heck those
functions come from is a pain. It wouldn't be in the syntax of the
language if it wasn't useful.
-bob
More information about the Baypiggies
mailing list