is importing redundantly harmful/wasteful?

Discussion in 'Python' started by python@sarcastic-horse.com, Sep 16, 2003.

  1. Guest

    I'm writing a function and it needs to use regular expressions and the
    super-fantastic mx.DateTime module. The first lines after the doc string
    in the function are:

    import re, mx.DateTime

    I'll be using this function in a bunch of different programs. Some of
    those programs might need re and mx.DateTime for other tasks.

    In some cases, I'll be redundantly importing these modules. Should I care
    if I'm re-importing re and mx.DateTime even after they've been imported?
    Does python do some sort of checking for this stuff or do I need to?
     
    , Sep 16, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    9
    Views:
    91
    Robert Klemme
    Apr 16, 2005
  2. Lew
    Replies:
    22
    Views:
    382
    kensi
    Aug 7, 2012
  3. uBend
    Replies:
    2
    Views:
    180
    Nadegda
    Aug 8, 2012
  4. Nadegda
    Replies:
    0
    Views:
    118
    Nadegda
    Aug 8, 2012
  5. Patricia Shanahan
    Replies:
    2
    Views:
    172
    kensi
    Aug 10, 2012
Loading...

Share This Page