[issue42359] tutorial: list is a class
New submission from Andy Harrington : Documentation in Tutorial section 9.3.3 seems to be stuck in Python 2: "In Python, the term method is not unique to class instances: other object types can have methods as well. For example, list objects have methods called append, insert, remove, sort, and so on." In Python 3 built-in types are derived from Object, so list is now a class, right? -- assignee: docs@python components: Documentation messages: 380997 nosy: andyharrington, docs@python priority: normal severity: normal status: open title: tutorial: list is a class versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue42359> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22121] IDLE should start with HOME as the initial working directory
Andy Harrington added the comment: This is really important for newbies. They have no business being in the system Python folder. And Idle is for newbies! I was teaching an intro Python class, and tried to help a student who had been writing programs in Idle, but now could not get Python going. It took many minutes for me to discover that he had created a new file while the shell window had focus, and innocently saved the file as math.py, without looking for a new directory to put it in. What a pain tracking that down! -- nosy: +andyharrington ___ Python tracker <https://bugs.python.org/issue22121> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear
Andy Harrington added the comment: This appears to be a system settings option in Mac OS Sierra set under the Dock, "prefer tabs when opening documents". With that choice, when there is the tab bar in an Idle edit window (more than one window superimposed, with tabs) the the whole bottom line with the horizontal separator line segment disappears: seems like no allowance is made for the vertical space taken up by the tab bar at top. There is a workaround: turn off this OS option, but unfortunate to need to do that, and the user has no warning that it is necessary. I only noticed this when I switched to a new machine and was doing initial diddling with the system options, and did not realize that i was not setting it up as I had it on my previous machine. Dr. Andrew N. Harrington Computer Science Department Graduate Program Director g...@cs.luc.edu Loyola University Chicago 207 Doyle Center, 1052 W Loyola Ave. http://www.cs.luc.edu/~anh Phone: 773-508-3569 Dept. Fax:773-508-3739 ahar...@luc.edu (as professor, not gpd role) On Mon, Oct 1, 2018 at 9:30 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > I do not see this 64-bit 3.7.1rc1 (see #34863) on 10.13.6 with, I believe, > default settings. > > Are you reporting multiple tabs as a bug, or a feature resulting from > intentional settings? If the latter, this may be something the tcl/tk does > not support properly. Ned and Tal, do either of you know anything about > this? > > In any case, is the status bar missing, or is the cursor position missing > from the status bar. > > -- > nosy: +ned.deily, taleinat > > ___ > Python tracker > <https://bugs.python.org/issue34864> > ___ > -- ___ Python tracker <https://bugs.python.org/issue34864> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34864] In Idle, Mac tabs make bottom editor line with cursor location disappear
New submission from Andy Harrington : Mac now puts multiple tabs inside of application window instead of starting a separate window (with some OS settings). With just one file being edited in Idle (no tab line) the bottom line with the numerical cursor coordinates is visible. When there are multiple tabs (and the tabbing heading therefore) the bottom cursor coordinates are missing. -- assignee: terry.reedy components: IDLE messages: 326822 nosy: andyharrington, terry.reedy priority: normal severity: normal status: open title: In Idle, Mac tabs make bottom editor line with cursor location disappear versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue34864> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34863] Idle Mac scrolling only down
New submission from Andy Harrington : In a source file in Idle I scroll down no matter which way I rotate the mouse wheel. This happens in no other app. Mac High Sierra OS. I have the Mac scrolling setup "natural" - backwards from the Windows directions. -- assignee: terry.reedy components: IDLE messages: 326821 nosy: andyharrington, terry.reedy priority: normal severity: normal status: open title: Idle Mac scrolling only down type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue34863> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6257] Idle terminates on source save while debugging
Andy Harrington added the comment: yes I certainly used breakpoints On Wed, Jul 18, 2012 at 4:50 PM, Roger Serwy wrote: > > Roger Serwy added the comment: > > The only was I get IDLE to crash is if the file has breakpoints enabled. > Is this how IDLE is crashing? > > -- > nosy: +serwy > > ___ > Python tracker > <http://bugs.python.org/issue6257> > ___ > -- ___ Python tracker <http://bugs.python.org/issue6257> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14454] argparse metavar list parameter with nargs=k
Andy Harrington added the comment: Withdrawn. My error. I missed the part of the documentation that says a *tuple*, not the list that I tried, does just what I wanted. -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue14454> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14454] argparse metavar list parameter with nargs=k
New submission from Andy Harrington : I now set the help string for an argparse option with two parameters: parser.add_argument('-s', '--substitute', nargs=2, help='Replace first string with second', metavar='string') which generates a help message -s string string, --substitute string string Replace first string with second Instead I would *like* to generate the help message -s fromString toString, --substitute fromString toString Replace fromString with toString At present metavar replaces each of multiple parameters with the same thing, but with a fixed number of parameters it makes sense that each may have a different meaning. It seems to me that when nargs=k is set for an integer k, we could have metavar be a list of k strings to go in the k places, as in parser.add_argument('-s', '--substitute', nargs=2, help='Replace fromString with toString', metavar=['fromString', 'toString']) and have this generate my desired help message. There is no need to break the current behavior: The parser can distinguish a list from a single string. The same text is in the attached file. -- components: Library (Lib) files: metavarListEnhancement.txt messages: 157148 nosy: andyharrington priority: normal severity: normal status: open title: argparse metavar list parameter with nargs=k type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25074/metavarListEnhancement.txt ___ Python tracker <http://bugs.python.org/issue14454> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
New submission from Andy Harrington : You cannot make a self-referential annotation like class Graph: def reverse(self) -> Graph: # ... This corresponds to a common coding situation. -- components: Interpreter Core messages: 129587 nosy: andyharrington priority: normal severity: normal status: open title: annotation for class being defined type: feature request versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue11339> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x
Changes by Andy Harrington : Added file: http://bugs.python.org/file20396/adder.cgi ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x
Changes by Andy Harrington : Added file: http://bugs.python.org/file20395/localCGIServer.py ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x
Changes by Andy Harrington : Added file: http://bugs.python.org/file20394/adderpost.html ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x
Changes by Andy Harrington : Added file: http://bugs.python.org/file20393/adder.html ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x
Changes by Andy Harrington : Removed file: http://bugs.python.org/file20392/localCGIServer.py ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x
Andy Harrington added the comment: I found a similar issue. If you want more simple files demonstrating the issue, I have attached some. If I start my localCGIServer.py, then I can use adder.html fine (uses get), but with adderpost.html (uses post) the cgi action file, adder.cgi (that worked fine with the get version) hangs. -- nosy: +andyharrington Added file: http://bugs.python.org/file20392/localCGIServer.py ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8755] idle crash UnicodeDecodeError utf-8 codec
New submission from Andy Harrington : I was editing in idle in python 3.1, typing away. I had been doing it for hours. I do not think I had jumped to the shell window. Suddenly idle crashed, with this error message in the the ubuntu 9,10 terminal window: Traceback (most recent call last): File "/usr/bin/idle3", line 5, in main() File "/usr/lib/python3.1/idlelib/PyShell.py", line 1420, in main root.mainloop() File "/usr/lib/python3.1/tkinter/__init__.py", line 1012, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding I do not know what key combination I had just typed. I may have just hit a crtl or alt combination. The hardware is an Acer notebook. This is certainly an exception that should be caught! I did not get to even save my work. -- components: IDLE messages: 105996 nosy: andyharrington priority: normal severity: normal status: open title: idle crash UnicodeDecodeError utf-8 codec type: crash versions: Python 3.1 ___ Python tracker <http://bugs.python.org/issue8755> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6257] Idle terminates on source save while debugging
New submission from Andy Harrington : When I am running the idle debugger, and change something in a source file and save it, the save works but idle immediately closes. I can see the debugger not liking it, but it would be much better if just the debugger stopped, not the whole idle environment. I'm running XP professional, Python 3.0.1 -- messages: 89217 nosy: andyharrington severity: normal status: open title: Idle terminates on source save while debugging type: crash versions: Python 3.0 ___ Python tracker <http://bugs.python.org/issue6257> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3570] str.find docstring typo
New submission from Andy Harrington <[EMAIL PROTECTED]>: When you enter help("".find) you get ... such that sub is contained within s[start,end] ... s[start, end] makes no sense. It should be s[start:end]. -- assignee: georg.brandl components: Documentation messages: 71240 nosy: andyharrington, georg.brandl severity: normal status: open title: str.find docstring typo versions: Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3570> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1038909] pydoc method documentation lookup enhancement
Andy Harrington <[EMAIL PROTECTED]> added the comment: Alexander, I have no idea why your patch languished. On the one hand I might have skipped this if I realized that before. On the other hand, I did add something extra, and I might not have had an open mind if I had looked at yours. Plus, maybe I got it moving! :) You made a good enhancement suggestion. From the continuing interchange below, it looks like two minds are better than either one. Comments on your comments on mine: 2. Hm, good point. I do not think pydoc should substitute for PyLint, but it only makes sense to copy the docs from the same type of function in an ancestor class: static, class or method, though you are right it need not matter whether the ancestor is built-in or not, though the assumption is made that you know about built-in docs - you might only note the inheritance. And again, as I did it, finding any ancestor of the wrong type should stop the search. There is one inconsistency with static method docs: If we are given a class, and have a static method in it, we can search the inheritance chain for docs. Neither of us does this at present, though it looks easier to add through my access point in docroutine. On the other hand, if the top-level request is just to document a static function, there is a problem, since you cannot identify the class it comes from, not having an im_class attribute, and hence the documentation may look different from when it was just a part of the documentation for the class. I do not see this as a reason to skip the inheritance chain for a static method when given it's class: better information in -> better information out. 3. I agree people should use doc strings not comments, but if everyone did that, our versions would have the same effect. The only difference is if the coder *does* want to use comments for some reason. Hence the question is: do you want to document what people do or push them to code the way you want? Ping apparently chose the former approach, so I am not suggesting changing it. Thanks, Andy _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1038909> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1038909] pydoc method documentation lookup enhancement
Andy Harrington <[EMAIL PROTECTED]> added the comment: HM, before writing my patch I tested pydoc to see the issue was still there. I did not look at the 2004 patch from aschmolck since it was so old and was clearly not implemented, and brett just listed this issue as one to deal with in 2008. Now I see pydoc.py.PATCH does address the same issue. Comments on the differences: 1. I allow for the case that an ancestor uses the name but not as a method. That *should* stop the search. 2. The 2004 patch does not use inspect.ismethod, but creates its own test. 3. I stuck with the original pydoc convention that comments could substitute for docs. The 2004 patch does not look for comments in ancestors and only uses comments in the current method if no ancestor has docs. That is a difference in design that could be discussed. I am OK with either. 4. The 2004 patch makes its substitution silently. I prefer explicitly noting that the docs are 'inherited'. 5. There is nothing to add to the test package in the 2004 patch. Before looking at the 2004 patch, I replaced my last patch. I just reread the Python source and documentation conventions and changed names and documentation to match. The only change to my previous comments is that test_pydoc_inheritance.regenerateData was renamed test_pydoc_inheritance.regenerate_data One related comment after thinking about the style guides: Should this pydoc change affect the style guide? Is duplication in the source code recommended for 'inherited' docs? Rather than say absolutely nothing in the overriding method, would a standard comment #inherit docs make sense in the source code? In that case a further change to pydoc is needed to recognize this as a special case, where the 'inherited' docs should be substituted. Alternately the search sequence followed in the 2004 patch could be used, which would find the inherited docs before the comment, whatever the comment. Added file: http://bugs.python.org/file9834/pydoc2.PATCH _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1038909> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1038909] pydoc method documentation lookup enhancement
Changes by Andy Harrington <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9823/pydoc.PATCH _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1038909> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1038909] pydoc method documentation lookup enhancement
Andy Harrington <[EMAIL PROTECTED]> added the comment: Several points: Additional note in pydoc output: I thought that 'inherited' docs should be marked, so I chose to add to the note for any function that gets docs displayed from an inherited function: ', docs from inherited ' Alternate verbiage could certainly be used, but I strongly believe that the substitution should be marked and its source indicated. This addition occurs in HTMLDoc.docroutine and TextDoc.docroutine. Elaboration? If a user just calls help() or help(), this patch is certainly appropriate. On the other hand, if the call is help(), and the module includes the definitions of the inherited classes from which documentation is 'inherited', then there is duplication within the output, which the user might or might not desire. To allow a choice would require a change in parameters or a global flag in pydoc. A global flag like allow_doc_redundancy could be set to False to block inherited documentation when the ancestor function is already putting a copy of the documentation in the output. I would be happy to add this change if requested, but I thought it would be presumptuous of me to just add it to the requested patch. Testing I added a test specifically for the inherited docs, test.test_pydoc_inheritance, generating documentaton on test.test_pydoc_sample and comparing results to previously generated results files test/test_pydoc.txt and test/test_pydoc.html. If further changes to pydoc cause outward change to the documentation format, run test_pydoc_inheritance.regenerateData() to replace the result files. Nothing in the patch in 2.6 dependent. Users could choose to upgrade pydoc for 2.5.x Added file: http://bugs.python.org/file9823/pydoc.PATCH _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1038909> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1038909] pydoc method documentation lookup enhancement
Andy Harrington <[EMAIL PROTECTED]> added the comment: After going to the sprint Monday, I am working on this as my first patch. There is no test file for pydoc. ?? -- nosy: +andyharrington _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1038909> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com