import random module
Carl Banks
invalidemail at aerojockey.com
Wed Mar 22 21:05:35 EST 2006
Ben Finney wrote:
> "DataSmash" <rdh at new.rr.com> writes:
> > * random.py:
> >
> > import random
>
> Now that you've tripped over this ambiguity of Python's current
> 'import' behaviour, you may be interested to know that the behaviour
> will change to solve this:
>
> <URL:http://www.python.org/dev/peps/pep-0328/>
I don't believe this change will solve the problem at hand, at least
there's nothing in the PEP that says it will. "import random" is an
absolute import even in random.py is in the current directory, because
current directory is in sys.path. Unless there's a change sys.path
planned, the shadowing should still happen.
Carl Banks
More information about the Python-list
mailing list