<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#330033">
On 7/21/2011 5:00 PM, Antoine Pitrou wrote:
<blockquote cite="mid:1311292807.3039.4.camel@localhost.localdomain"
type="cite">
<pre wrap="">Le vendredi 22 juillet 2011 à 09:53 +1000, Nick Coghlan a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">On Fri, Jul 22, 2011 at 9:35 AM, Antoine Pitrou <a class="moz-txt-link-rfc2396E" href="mailto:solipsis@pitrou.net"><solipsis@pitrou.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Tue, 19 Jul 2011 23:58:55 -0400
"P.J. Eby" <a class="moz-txt-link-rfc2396E" href="mailto:pje@telecommunity.com"><pje@telecommunity.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
Anyway, to make a long story short, we came up with an alternative
implementation plan that actually solves some other problems besides
the one that PEP 382 sets out to solve, and whose implementation a
bit is easier to explain. (In fact, for users coming from various
other languages, it hardly needs any explanation at all.)
</pre>
</blockquote>
<pre wrap="">
I have a question.
If I have (on sys.path) a module "x.py" containing, say:
y = 5
and (also on sys.path), a directory "x" containing a "y.py" module.
What is "from x import y" supposed to do?
(currently, it would bind "y" to its value in x.py)
</pre>
</blockquote>
<pre wrap="">
It would behave the same as it does today: the imported value of 'y' would be 5.
Virtual packages only kick in if an import would otherwise fail.
</pre>
</blockquote>
<pre wrap="">
Wouldn't it produce confusing situations like the above example?
Regards
Antoine.
</pre>
</blockquote>
<br>
If I have (on sys.path), a directory "x" containing a "y.py" module,
and later (on sys.path), another directory "x" containing a "y.py"
module, what is "from x import y" supposed to do?<br>
<br>
OR<br>
<br>
If I have (on sys.path), a module "x.py" containing, say:<br>
<br>
y = 5<br>
<br>
and later (on sys.path), another module "x.py" containing, say:<br>
<br>
y = 6<br>
<br>
what is "from x import y" supposed to do?<br>
<br>
<br>
I guess I don't see how this new proposal makes anything more
confusing than it already is?<br>
</body>
</html>