Peng Yu <> writes:

> I want to import all the thing (or the ones available in the
> respective __all__) defined in each of the file by putting the
> following lines in
> from file1 import *
> ....
> from filen import *
> However, I don't want to hardcode the file names in Is
> there an automatic way of doing it?

Why do you want to do that? It will defeat static analysis of the code,
which is one of the more important tools to make your code reliable.

It will also make the names in the code impossible to automatically
match against where they came from. Explicit is better than implicit;
you are proposing to make an unknown horde of names in the code implicit
and untraceable.

Why? What problem are you trying to solve that you believe needs this

 \           “Anything that we scientists can do to weaken the hold of |
  `\        religion should be done and may in the end be our greatest |
_o__)                  contribution to civilization.” —Steven Weinberg |
Ben Finney


Reply via email to