Re: Public imports

2008-12-08 Thread Bruno Desthuilliers
Márcio Faustino a écrit : So, no chance of doing this: # "A.py" from __future__ import division, with_statement # "B.py" from A import * print 1 / 2 ...and printing 0.5, right? Nope, but for totally unrelated reasons (cf Skip's anwer). OTHO, this is valid: # foo.py def bar(): return "ba

Re: Public imports

2008-12-08 Thread Diez B. Roggisch
Márcio Faustino schrieb: So, no chance of doing this: # "A.py" from __future__ import division, with_statement # "B.py" from A import * print 1 / 2 ...and printing 0.5, right? Too bad :) Au contraire - *very* good. If it were otherwise, what would happen to code that _relies_ on / returning

Re: Public imports

2008-12-08 Thread skip
Márcio> So, no chance of doing this: Márcio> # "A.py" Márcio> from __future__ import division, with_statement Márcio> # "B.py" Márcio> from A import * Márcio> print 1 / 2 Márcio> ...and printing 0.5, right? Too bad :) "from __future__ ..." isn't really an import stat

Re: Public imports

2008-12-08 Thread Benjamin Kaplan
On Mon, Dec 8, 2008 at 1:29 PM, Márcio Faustino <[EMAIL PROTECTED]>wrote: > So, no chance of doing this: > > # "A.py" > from __future__ import division, with_statement > > # "B.py" > from A import * > print 1 / 2 > > ...and printing 0.5, right? Too bad :) > Thanks! That would be a very bad idea

Re: Public imports

2008-12-08 Thread Márcio Faustino
So, no chance of doing this: # "A.py" from __future__ import division, with_statement # "B.py" from A import * print 1 / 2 ...and printing 0.5, right? Too bad :) Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Public imports

2008-12-08 Thread bearophileHUGS
> D type system has several big holes, I meant "D module system", of course. Sorry. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Public imports

2008-12-08 Thread bearophileHUGS
Márcio Faustino: > Does Python support public imports instead of the default private? > Something like D's "public import" (see <http://www.digitalmars.com/d/ > 2.0/module.html>) or even Perl's "export_to_level". D type system has several big holes,

Re: Public imports

2008-12-08 Thread Bruno Desthuilliers
Márcio Faustino a écrit : Hi, Does Python support public imports instead of the default private? Python has no notion of "public" or "private" !-) Something like D's "public import" (see <http://www.digitalmars.com/d/ 2.0/module.html>) Python imp

Public imports

2008-12-08 Thread Márcio Faustino
Hi, Does Python support public imports instead of the default private? Something like D's "public import" (see <http://www.digitalmars.com/d/ 2.0/module.html>) or even Perl's "export_to_level". Thanks, -- http://mail.python.org/mailman/listinfo/python-list