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. Advertisements

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. Robert Mischke
    Replies:
    3
    Views:
    1,739
    Tony Morris
    May 19, 2005
  2. Toby A Inkster
    Replies:
    19
    Views:
    976
  3. Andy Dingley

    XTech conference considered harmful?

    Andy Dingley, Feb 13, 2006, in forum: HTML
    Replies:
    2
    Views:
    731
    Richard Sexton
    Feb 14, 2006
  4. plb
    Replies:
    2
    Views:
    537
  5. Chris
    Replies:
    9
    Views:
    238
    Robert Klemme
    Apr 16, 2005
  6. Lew
    Replies:
    22
    Views:
    654
    kensi
    Aug 7, 2012
  7. uBend
    Replies:
    2
    Views:
    411
    Nadegda
    Aug 8, 2012
  8. Patricia Shanahan
    Replies:
    2
    Views:
    298
    kensi
    Aug 10, 2012
Loading...