import random module

Carl Banks invalidemail at
Thu Mar 23 03:05:35 CET 2006

Ben Finney wrote:
> "DataSmash" <rdh at> writes:
> > *
> >
> > 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:>

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 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