CC'ing Python-Ideas. Follow-ups to Python-Ideas please.
On Thu, Oct 29, 2015 at 09:22:15PM -0400, Terry Reedy wrote:
> Leaving IDLE aside, the reason '' is added to sys.path is so that people
> can import their own modules. This is very useful. Shadowing is the
> result of putting it at the
On 30.10.15 09:57, Nathaniel Smith wrote:
Unfortunately I think that (among other things) there are a lot of
scripts out there that blindly do sys.path.pop(0) to remove the ""
entry, so the backcompat costs of changing this would probably be
catastrophic.
You are right. There are too much
On Oct 29, 2015 6:26 PM, "Terry Reedy" wrote:
>
> On 10/29/2015 11:59 AM, Laura Creighton wrote:
>>
>>
>> see the following:
>> lac@smartwheels:~/junk$ echo "print ('hello there')" >string.py
>> lac@smartwheels:~/junk$ idle-python3.5
>> hello there
>> Traceback (most recent call
On 30.10.15 03:22, Terry Reedy wrote:
Leaving IDLE aside, the reason '' is added to sys.path is so that people
can import their own modules. This is very useful. Shadowing is the
result of putting it at the front. I have long thought this a dubious
choice. If '' were instead appended, people
On Fri, 30 Oct 2015 at 21:42 Terry Reedy wrote:
> On 10/30/2015 3:21 AM, Serhiy Storchaka wrote:
>
> > AFAIK the sys module can't be shadowed.
>
> I tried it and it seems to be true of builtins in general.
>
The importer on sys.meta_path that handles built-ins is earlier than
On 10/30/2015 3:21 AM, Serhiy Storchaka wrote:
AFAIK the sys module can't be shadowed.
I tried it and it seems to be true of builtins in general.
--
Terry Jan Reedy
___
Python-Dev mailing list
Python-Dev@python.org
see the following:
lac@smartwheels:~/junk$ echo "print ('hello there')" >string.py
lac@smartwheels:~/junk$ idle-python3.5
hello there
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/idlelib/run.py", line 10, in
from idlelib import CallTips
File
On Oct 29, 2015 10:22 AM, "Brett Cannon" wrote:
>
>
>
> On Thu, 29 Oct 2015 at 09:00 Laura Creighton wrote:
>>
>>
>> see the following:
>> lac@smartwheels:~/junk$ echo "print ('hello there')" >string.py
>> lac@smartwheels:~/junk$ idle-python3.5
>> hello there
On Thu, 29 Oct 2015 at 09:00 Laura Creighton wrote:
>
> see the following:
> lac@smartwheels:~/junk$ echo "print ('hello there')" >string.py
> lac@smartwheels:~/junk$ idle-python3.5
> hello there
> Traceback (most recent call last):
> File "", line 1, in
> File
In a message of Thu, 29 Oct 2015 19:13:08 +, Paul Moore writes:
>> I am actually sick of the 'consenting adults' argument.
>> I am dealing with '11 year old children trying to write their
>> first, third and tenth python programs'. For the life of me
>> I cannot see how convenience for the
In a message of Thu, 29 Oct 2015 19:30:09 +, Paul Moore writes:
>On 29 October 2015 at 18:45, Donald Stufft wrote:
>> So I don=E2=80=99t think it=E2=80=99s true that people don=E2=80=99t shad=
>> ow the standard library, they just have various ways to do it that have s=
>>
In a message of Thu, 29 Oct 2015 18:27:59 +, Paul Moore writes:
>The idle issues seem to me to demonstrate that shadowing the stdlib is
>a bad idea. Of course, consenting adults, and if you override you're
>responsible for correctly replacing the functionality, and all that,
>but honestly, I
On 29 October 2015 at 18:46, Laura Creighton wrote:
> In a message of Thu, 29 Oct 2015 18:27:59 +, Paul Moore writes:
>>The idle issues seem to me to demonstrate that shadowing the stdlib is
>>a bad idea. Of course, consenting adults, and if you override you're
>>responsible
On 29 October 2015 at 17:36, Donald Stufft wrote:
> On October 29, 2015 at 1:32:31 PM, Nathaniel Smith (n...@pobox.com) wrote:
>> > (I know saying that last part out loud will probably just cause
>> someone to pop out of the woodwork and explain how shadowing the
>> sys module
On October 29, 2015 at 2:28:02 PM, Paul Moore (p.f.moore=40gmail.com) wro=
te:
> On 29 October 2015 at 17:36, Donald Stufft wrote:
> > On October 29, 2015 at 1:32:31 PM, Nathaniel Smith (njs=40pobox.com) =
wrote:
> >> > (I know saying that last part out loud will probably just cause
> >> someone
On Oct 29, 2015 11:45 AM, "Donald Stufft" wrote:
>
> Every test runner that includes a =E2=80=94pdb flag that will automatical=
> ly invoke pdb at the point of failure. If pdb++ didn=E2=80=99t force the =
> shadowing of stdlib, then every single test runner would need an option
On 29 October 2015 at 18:45, Donald Stufft wrote:
> So I don=E2=80=99t think it=E2=80=99s true that people don=E2=80=99t shad=
> ow the standard library, they just have various ways to do it that have s=
> everal gotchas and require people to generally hack around the
> On Oct 29, 2015, at 11:46, Laura Creighton wrote:
>
> In a message of Thu, 29 Oct 2015 18:27:59 +, Paul Moore writes:
>> The idle issues seem to me to demonstrate that shadowing the stdlib is
>> a bad idea. Of course, consenting adults, and if you override you're
>>
Laura, I think what you want should actually be more-or-less doable in IDLE.
The main routine that starts IDLE should be able to detect if it starts
correctly (something unlikely to happen if a significant stdlib module is
shadowed), watch for an attribute error of that form and try to
In a message of Thu, 29 Oct 2015 13:26:08 -0700, Mark Roseman writes:
>Laura, I think what you want should actually be more-or-less doable in IDLE.
>
>The main routine that starts IDLE should be able to detect if it starts
>correctly (something unlikely to happen if a significant stdlib module is
> Need I submit a bug report/feature request to get this happening?
> Very, very pleased to have mentioned it …
I took care of the bug report.
Glad you mentioned it. My personal opinion is that many of the error messages
in IDLE (to say nothing of large parts of the overall user experience) are
On 10/29/2015 12:30 PM, Paul Moore wrote:
On 29 October 2015 at 18:45, Donald Stufft wrote:
So I don=E2=80=99t think it=E2=80=99s true that people don=E2=80=99t shad=
ow the standard library, they just have various ways to do it that have s=
everal gotchas and require people
Why not just check the path of the imported modules and compare it with the
Python library directory?
On October 29, 2015 3:26:08 PM CDT, Mark Roseman wrote:
>Laura, I think what you want should actually be more-or-less doable in
>IDLE.
>
>The main routine that starts IDLE
In a message of Thu, 29 Oct 2015 15:50:30 -0500, Ryan Gonzalez writes:
>Why not just check the path of the imported modules and compare it with the
>Python library directory?
My friend Åsa who is 12 years old suggested exactly this at the club. If this
works then I will be certain to mention
Well, tell your friend that that means middle and high schoolers must think
alike! :D
On Thu, Oct 29, 2015 at 4:18 PM, Laura Creighton wrote:
> In a message of Thu, 29 Oct 2015 15:50:30 -0500, Ryan Gonzalez writes:
> >Why not just check the path of the imported modules and
On October 29, 2015 at 1:32:31 PM, Nathaniel Smith (n...@pobox.com) wrote:
> > (I know saying that last part out loud will probably just cause
> someone to pop out of the woodwork and explain how shadowing the
> sys module is a great idea and they do it all the time or whatever,
> but I
Well, this works on Python 2 only (I'm on a phone with only access to 2 right
now), but this is a start (apologies for the screwy syntax highlighting):
import sys, imp, logging, os
modules = '''
imp
string
...
'''.split()
class StdlibTester(object):
base =
On Thu, Oct 29, 2015 at 1:50 PM, Ryan Gonzalez wrote:
> Why not just check the path of the imported modules and compare it with the
> Python library directory?
It works, but it requires that everyone who could run into this
problem carefully add some extra guard code to every
On Thu, 29 Oct 2015 16:56:38 -0700, Nathaniel Smith wrote:
> On Thu, Oct 29, 2015 at 1:50 PM, Ryan Gonzalez wrote:
> > Why not just check the path of the imported modules and compare it with the
> > Python library directory?
>
> It works, but it requires that
On 10/29/2015 4:53 PM, Mark Roseman wrote:
Need I submit a bug report/feature request to get this happening?
Very, very pleased to have mentioned it …
I took care of the bug report.
The idle issue is https://bugs.python.org/issue25514
As I said there, I think that removing '' from sys.path,
On 10/29/2015 11:59 AM, Laura Creighton wrote:
see the following:
lac@smartwheels:~/junk$ echo "print ('hello there')" >string.py
lac@smartwheels:~/junk$ idle-python3.5
hello there
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/idlelib/run.py", line 10,
On 10/29/2015 5:18 PM, Laura Creighton wrote:
In a message of Thu, 29 Oct 2015 15:50:30 -0500, Ryan Gonzalez writes:
Why not just check the path of the imported modules and compare it with the
Python library directory?
My friend Åsa who is 12 years old suggested exactly this at the club.
32 matches
Mail list logo