[Tutor] "from this import *" or "import this"

Jean Montambeault jrm@videotron.ca
Sun, 2 Dec 2001 17:01:43 +0200


    Be ready for a whole lot of very newbie questions. I've never programmed
before and do not intend to make a career out of what I am learning : pure
amateurism here which does not necessarily implies triviality but that
shouldn't be a surprise.

    So :
        is there a real use for the form "from this_module import * " since
                (a) there seems to be a real danger to get some functions or
variables which would have the same name if more than one module are open
that way
                (b) nothing shows the relation to the module which is to
some extent documenting the program
                (c) it imports the whole module (I guess) just as "import
this_module" seems to be doing
        ?
        Or is it much safer and wiser to avoid using it ?

        Thanks

       Jean M.