"人言落日是天涯,望极天涯不见家" <kelvin....@gmail.com> wrote in message
news:fa94323b-d859-4599-b236-c78a22b3d...@t19g2000prd.googlegroups.com...
On Feb 27, 9:22 pm, "Frank Millman" <fr...@chagford.com> wrote:
This behavior is by design or just a bug for Python3.x ?
Definitely by design.
Have a look at PEP 328 - http://www.python.org/dev/peps/pep-0328/
"In Python 2.4 and earlier, if you're reading a module located inside a
package, it is not clear whether
import foo
refers to a top-level module or to another module inside the package. As
Python's library expands, more and more existing package internal modules
suddenly shadow standard library modules by accident. It's a particularly
difficult problem inside packages because there's no way to specify which
module is meant. To resolve the ambiguity, it is proposed that foo will
always be a module or package reachable from sys.path. This is called an
absolute import."
HTH
Frank
--
http://mail.python.org/mailman/listinfo/python-list