[issue25522] IDLE: warn if save-as name matches stdlib name

2019-11-04 Thread Zackery Spytz
Zackery Spytz added the comment: I have created a pull request for this issue. -- nosy: +ZackerySpytz ___ Python tracker ___ ___

[issue25522] IDLE: warn if save-as name matches stdlib name

2019-11-04 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16565 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17051 ___ Python tracker

[issue25522] IDLE: warn if save-as name matches stdlib name

2019-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Beginners import stdlib files such as random. And they save scripts with such name, and accidentally import the script when not desired. Beginners should learn how to test a script by running a test file provided by an instructor or written themselves. In

[issue25522] IDLE: warn if save-as name matches stdlib name

2019-01-18 Thread Vedran Čačić
Vedran Čačić added the comment: Many beginners don't write files in order to import them. For them, these name-checking is simply adding noise. If you want to do something in this area, I think a much more useful (and difficult) course of action would be to check on the opposite end. If an

[issue25522] IDLE: warn if save-as name matches stdlib name

2019-01-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Also check if the name is not an identifier and therefore could not be imported. Example: >>> exec('import abc--bb') import abc--bb ^ SyntaxError: invalid syntax -- ___ Python tracker

[issue25522] IDLE: warn if save-as name matches stdlib name

2017-06-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-27 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-01 Thread Laura Creighton
Laura Creighton added the comment: Do we need a full path name here as well? Probably not. -- ___ Python tracker ___

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-01 Thread Laura Creighton
Laura Creighton added the comment: I'm not sure about "Neither you nor Python will be able to import the stdlib." Depending on what the file is, you may be able to import it later. I'd prefer: "If you run Python in this directory, your version of will be used instead of the one in the

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The lib messages should say "Neither you nor python will be able to import the stdlib module". Example of python-imported lib names that a beginner might write are abc, io, os, nt, and stat. -- ___ Python tracker

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-10-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: When users 'saveas', warn if name matches that of a stdlib modules. Note that shadowing is opposite for lib and binary (builtin) modules, so message needs to be different. I am not worrying about 3rd party modules on the search path (ie, site-packages),