[Twisted-Python] python's "import" is giving me a headache.
twisted at itamarst.org
Wed Dec 5 04:31:46 EST 2001
Glyph Lefkowitz wrote:
>The number of conflicts both between modules and convenient variable
>names is increasing with time, and I think that something has to be done
>about it, but I don't know if this is an appropriate solution. At any
>rate, such a change will likely affect most Twisted developers, so I'd
>like to hear feedback before I do anything.
This seems a rather drastic solution, and ugly to boot (3 lines of code
every time I want to import something?). And won't this making reloading
modules much more problematic?
There might be other ways to solve it - for example, module names can
BeCapitalized, which solves the vairable/module clashing issue (then
it's harder to differentiate between module and classes, but there are
certainly much fewer classes then there are variables).
What methods do other large frameworks do to solve the issue?
More information about the Twisted-Python