Package name with '.' in them: Python Bug ?

Josiah Carlson jcarlson at nospam.uci.edu
Sat Mar 20 05:04:19 EST 2004


> Well, I wrote one (it's generated names, that's why it happenned) ;)

That doesn't make it a good idea.  If it wasn't clear, I meant that of 
the thousands of Python source files I've seen, I've never seen any 
named with a dot.  Probably because they don't work correctly, as you 
have found.

You didn't answer my question as to whether module_5.py is reasonable 
replacement for the module.5.py naming scheme you are currently using.


>> Considering that you have shown that it does not work, and that there 
>> is documentation stating that it is not /meant/ to work
> 
> The doc is not so explicit. It says that hierarchical modules are not 
> handled by load_module(), fine, i dont want to handle hierarchicals one, 
> just a simple one that has a don in its name.

The documentation is specific, you quoted it yourself:
"This function does not handle hierarchical module names (names 
containing dots)."

Any file name with a dot that is not the extension of the file, is 
considered hierarchical, and is "not handled".


>> then the error is in the way /you/ name /your/ modules, not the way 
>> Python handles /incorrectly/ named modules.
> 
> That's exactly what I said, and I tend to believe it.

Then you agree that your naming scheme is flawed.  Stop doing it.

  - Josiah



More information about the Python-list mailing list