At 2008-12-01T11:30:44Z, Nick Craig-Wood <[EMAIL PROTECTED]> writes:
> Importing the module is actualy slower... If you import the name into
> your namespace then there is only one lookup to do. If you import the
> module there are two.
Note that if you're importing the entire module but want t
On Tue, Dec 02, 2008 at 10:53:47PM -0500, Steve Holden wrote:
> Pardon me for intruding, but timings here are entirely the wrong focus
> for a Python newcomer. Given that imports are super-optimized (i.e. the
> code in the module is only performed once) such a small difference in
> timing is incons
Filip Gruszczyński wrote:
[something I moved to after Nick's reply, where it belongs]
> 2008/12/1 Nick Craig-Wood <[EMAIL PROTECTED]>:
>> Rafe <[EMAIL PROTECTED]> wrote:
>>> On Dec 1, 7:26?am, "Filip Gruszczy?ski" <[EMAIL PROTECTED]> wrote:
I have following question: if I use
from m
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Tue, 02 Dec 2008 11:12:31 +, Nick Craig-Wood wrote:
>
> > I prefer the "from module import function". That means that if "module"
> > doesn't supply "function" it raises an exception at compile time, not
> > run time when you try to run "module
On Tue, 02 Dec 2008 11:12:31 +, Nick Craig-Wood wrote:
> I prefer the "from module import function". That means that if "module"
> doesn't supply "function" it raises an exception at compile time, not
> run time when you try to run "module.function".
Wanna bet?
>>> def spam():
... from
Nick Craig-Wood a écrit :
On Tue, Dec 02, 2008 at 11:24:29AM +0600, Taskinoor Hasan wrote:
On Mon, Dec 1, 2008 at 8:21 PM, Filip Gruszczy?ski <[EMAIL PROTECTED]>wrote:
I see. Thanks for a really good explanation, I like to know, how to do
things in the proper way :)
I always prefer to use imp
On Tue, Dec 02, 2008 at 11:24:29AM +0600, Taskinoor Hasan wrote:
> On Mon, Dec 1, 2008 at 8:21 PM, Filip Gruszczy?ski <[EMAIL PROTECTED]>wrote:
>
> > I see. Thanks for a really good explanation, I like to know, how to do
> > things in the proper way :)
>
> I always prefer to use import module and
On Mon, Dec 1, 2008 at 8:21 PM, Filip Gruszczyński <[EMAIL PROTECTED]>wrote:
> I see. Thanks for a really good explanation, I like to know, how to do
> things in the proper way :)
I always prefer to use import module and then use module.function. The
reason is simple. It makes the code more read
I see. Thanks for a really good explanation, I like to know, how to do
things in the proper way :)
2008/12/1 Nick Craig-Wood <[EMAIL PROTECTED]>:
> Rafe <[EMAIL PROTECTED]> wrote:
>> On Dec 1, 7:26?am, "Filip Gruszczy?ski" <[EMAIL PROTECTED]> wrote:
>> > I have following question: if I use
>> >
>
Rafe <[EMAIL PROTECTED]> wrote:
> On Dec 1, 7:26?am, "Filip Gruszczy?ski" <[EMAIL PROTECTED]> wrote:
> > I have following question: if I use
> >
> > from module import *
> >
> > instead
> >
> > from module import Class
> >
> > am I affecting performance of my program? I believe, that all those
> >
On Dec 1, 7:26 am, "Filip Gruszczyński" <[EMAIL PROTECTED]> wrote:
> I have following question: if I use
>
> from module import *
>
> instead
>
> from module import Class
>
> am I affecting performance of my program? I believe, that all those
> names must be stored somewhere, when they are imported
Filip Gruszczyński wrote:
I have following question: if I use
from module import *
instead
from module import Class
am I affecting performance of my program? I believe, that all those
names must be stored somewhere, when they are imported and then
browsed when one of them is called. So am I p
I have following question: if I use
from module import *
instead
from module import Class
am I affecting performance of my program? I believe, that all those
names must be stored somewhere, when they are imported and then
browsed when one of them is called. So am I putting a lot of "garbage"
to
13 matches
Mail list logo