[issue1707] probable bug in code.py with Python 3.0a2

2007-12-28 Thread Andre Roberge
New submission from Andre Roberge: There appears to be a bug in code.py in Python 3.0a2/a1. I believe that the body of InteractiveConsole().raw_input() should be changed from sys.stdout.write(prompt) sys.stdout.flush() return sys.stdin.readline() to return input

[issue1707] probable bug in code.py with Python 3.0a2

2008-01-01 Thread Andre Roberge
Changes by Andre Roberge: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1707 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python

[issue1707] probable bug in code.py with Python 3.0a2

2008-01-01 Thread Andre Roberge
Andre Roberge added the comment: I did a quick search on the *.py files in the distribution. I only found two questionable places. 1. site.py has raw_input (python 2.5, line 311) replaced by the more complicated 3 lines (python 3.0a2, lines 313-315) rather than the simpler one-liner

[issue1775] filehandle.write() does not return None (Python 3.0a2)

2008-01-09 Thread Andre Roberge
New submission from Andre Roberge: According to the docs, and consistent with the Python 2.x behavior, filehandle.write() should return None. However, under 3.0a2 (and 3.0a1), it returns the number of characters written. Either the documentation http://docs.python.org/dev/3.0/tutorial

[issue1775] filehandle.write() does not return None (Python 3.0a2)

2008-01-09 Thread Andre Roberge
Andre Roberge added the comment: After doing some more reading, I realize that the current behaviour is totally consistent with http://www.python.org/dev/peps/pep-3116/ which I should have consulted first. So perhaps it should be considered to be simply a case of a documentation error, as I

[issue6565] improper use of __setitem__ in ElementTree for Python 3.1

2009-07-24 Thread Andre Roberge
New submission from Andre Roberge andre.robe...@gmail.com: I have a function to replace the content of an ElementTree Element by that of another one which works using Python 2 but not with Python 3. I get an assertion error. It was suggested on the Python list that the problem

[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-01-28 Thread Andre Roberge
Andre Roberge added the comment: If anyone is still interested in this, I did that today (scratching a personal itch - not knowing this had been filed before). What I have done: 1. Moved all the font/color information to a separate css file 2. Used html5 syntax. 3. Recreated a css style

[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-01-28 Thread Andre Roberge
Andre Roberge added the comment: Rather than creating a new branch, I took another copy of pydoc.py, kept its name, and only applied the html-related changes in it. (no new -c option, no unrelated PEP8 changes to the best of my knowledge.) The original pydoc.py referred to pydoc_data

[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-01-28 Thread Andre Roberge
Andre Roberge added the comment: I could certainly create a new branch and revert the PEP8 changes and the new -c option, but before I do this, could you confirm that the new html output would be deemed to be acceptable? -- ___ Python tracker rep

[issue23660] Turtle left/right inverted when using different coordinates orientation

2015-03-13 Thread Andre Roberge
New submission from Andre Roberge: The turtle module using screen coordinates such that the vertical coordinate increases vertically on the screen. This orientation is different from the traditional orientation for graphics programs. It is possible to set coordinates with the normal

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Andre Roberge
New submission from Andre Roberge: The documentation for eval() indicates that it takes keyword arguments: eval(expression, globals=None, locals=None) However, that is incorrect, as indicated by the builtin help: >>> help(eval) Help on built-in function eval in module builti

[issue10716] Modernize pydoc to use better HTML and separate CSS

2016-10-04 Thread Andre Roberge
Andre Roberge added the comment: When rhettinger created this issue, the goal was "Pydoc currently generated 1990's style html which mixes content and presentation, making it very difficult for users to customize the appearance of the output. ... Please convert it to simple, validated

[issue23660] Turtle left/right inverted when using different coordinates orientation

2018-06-16 Thread Andre Roberge
Andre Roberge added the comment: I am sorry to hear that this bug was closed based on the unproven assumption that this would impact teaching material. I have *never* seen any pedaggical material for the turtle module where the instructor wrote "use left() to have the turtle turn

[issue10716] Modernize pydoc to use better HTML and separate CSS

2019-03-23 Thread Andre Roberge
Andre Roberge added the comment: On Sat, Mar 23, 2019 at 6:27 PM Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > I've found the HTML to be useful (-w mode, not running a server) for > generating quick documentation (much lighter weight commitment than

[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-27 Thread Andre Roberge
Andre Roberge added the comment: I volunteer to do some testing. In addition to the problem I noted on my computer where the status bar disappeared behind the task bar, I noticed that on my secondary 4k monitor (resolution: 3840 x 2160), clicking Zoom Height resulted in a window stretched

[issue37039] IDLE: Zoom Height Restore restores to default, not previous size

2019-05-25 Thread Andre Roberge
Andre Roberge added the comment: I have tried on another computer (Windows 10, screen resolution 1920 x 1080, text scaling 100%) and it works as expected: clicking on Restore Height restores the window's height to its original value. Back to the computer where I reported the problem

[issue37041] IDLE: path browser unusable on some displays

2019-05-25 Thread Andre Roberge
New submission from Andre Roberge : On my computer (Windows 10, screen resolution 3000 x 2000, scaling of text and other elements set at 200% as the recommended value), the path browser is essentially unusable as the items overlap each other. See the attached image. I found that changing

[issue37039] IDLE: Zoom Height Restore restores to default, not previous size

2019-05-25 Thread Andre Roberge
Andre Roberge added the comment: As reported on the idle-dev list, on my system (Windows 10, display resolution 3200 x 200, scaling of text at 200% as recommended), the Zoom Height changes the height of the window and Idle's status bar is no longer visible. Clicking on Restore Height does

[issue37041] IDLE: path browser unusable on some displays

2019-05-26 Thread Andre Roberge
Andre Roberge added the comment: I ran the example you gave and it worked perfectly. -- ___ Python tracker <https://bugs.python.org/issue37041> ___ ___ Pytho

[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Andre Roberge
Andre Roberge added the comment: On Sat, May 25, 2019 at 9:49 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Thank you. Along with your path browser report, things are much > clearer. With variable pixel densities and custom settings, we cannot > use f

[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Andre Roberge
Andre Roberge added the comment: Thanks. I did a quick check. 114 solves the problem of the Restore Height not working, but the status bar is still hidden. To me, the crucial part of the problem was the restore height not working, so I'd be happy with this. At 164, I can see parts

[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-30 Thread Andre Roberge
Andre Roberge added the comment: As I wrote on Github: On my computer (Windows 10, resolution: 3000 x 2000, scaling of UI elements set to 200%), clicking on Zoom Height makes Idle go full screen. Clicking on the same menu (now called Restore Height) does absolutely nothing: Idle stays in full

[issue33944] Deprecate and remove pth files

2020-01-02 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue33944> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41488] Unusable type hint should not be silently ignored

2020-08-05 Thread Andre Roberge
New submission from Andre Roberge : The following code is currently consistent with the type hint syntax but contains a line that is completely ignored. >>> d = {} >>> d['a']: int >>> d {} >>> __annotations__ {} >>> '_

[issue42577] Unhelpful syntax error when expression spans multiple lines

2020-12-11 Thread Andre Roberge
Andre Roberge added the comment: I suspect that the Python parser cannot easily be changed to given any other message. Replace the colon by "else" and add one more closing parenthesis and you have a valid Python program. So, is it a matter of an unclosed parenthesis, or not u

[issue43017] Improve error message in the parser when using un-parenthesised tuples in comprehensions

2021-01-25 Thread Andre Roberge
Andre Roberge added the comment: Such a change would be very useful and appreciated by other users as reported on https://github.com/aroberge/friendly-traceback/issues/167 and asked about on StackOverflow https://stackoverflow.com/questions/60986850/why-does-creating-a-list-of-tuples-using

[issue36086] Split IDLE into separate feature in Windows installer

2021-01-25 Thread Andre Roberge
Andre Roberge added the comment: I do not use IDLE (except for testing) and would not be affected by such a change. However, many tutorials and books intended for beginners instruct users to use IDLE, with the assumption that it is available out of the box. Removing IDLE would immediately

[issue42997] Improve error message for missing : before suites

2021-01-22 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue42997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-22 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue42955> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-01-23 Thread Andre Roberge
Andre Roberge added the comment: Terry: I will put it on my todo list. Friendly-traceback can currently work (indirectly) with IDLE; see https://aroberge.github.io/friendly-traceback-docs/docs/html/editor.html I am not sure what benefit this patch will yield when it comes to using

[issue43121] Incorrect SyntaxError message for missing comma (3.10.a5)

2021-02-03 Thread Andre Roberge
New submission from Andre Roberge : A missing comma between list items results in an incorrect message. Python 3.10.0a5 (tags/v3.10.0a5:b0478d7, Feb 3 2021, 01:44:54) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license"

[issue43121] Incorrect SyntaxError message for missing comma (3.10.a5)

2021-02-03 Thread Andre Roberge
Andre Roberge added the comment: Pablo: to run the friendly-traceback test suite is simply a matter of typing "pytest" from the root directory of the repository (after installing the dependencies). However, it would not be helpful for the purpose of CPython development, as l

[issue43121] Incorrect SyntaxError message for missing comma (3.10.a5)

2021-02-03 Thread Andre Roberge
Andre Roberge added the comment: Pablo: The tests are in https://github.com/aroberge/friendly-traceback/tree/master/tests/syntax I plan to soon add at least two dozen more based on recent contributions. The full results can be seen on the documentation site; for example https

[issue43121] Incorrect SyntaxError message for missing comma (3.10.a5)

2021-02-03 Thread Andre Roberge
Andre Roberge added the comment: Pablo: I have almost exactly the same 4 test cases that you added in the test suite, so it would pass my tests too. I would consider it to be resolved. (For example: https://aroberge.github.io/friendly-traceback-docs/docs/html/syntax_tracebacks_en_3.9.html

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-02-03 Thread Andre Roberge
Andre Roberge added the comment: Terry: as per your earlier comment, I have tried to use Friendly-traceback with the latest version. While it does set the exception hook correctly, it is not useful. Friendly-traceback (FT) needs to have access to the code that was executed. FT's REPL

[issue43117] Translation Mistakes

2021-02-03 Thread Andre Roberge
Andre Roberge added the comment: A similar error exists in the table for the French documentation where "valeurs" is indicated to be one of the options https://docs.python.org/fr/3.8/library/tkinter.ttk.html#widget -- nosy: +aroberge

[issue44335] "Wrong" invalid character identified

2021-06-07 Thread Andre Roberge
New submission from Andre Roberge : When using Python 3.10.0b2 on a line with more than one invalid characters, the second one is identified as being incorrect, whereas in previous versions the first such character was identified. > py -3.8 unicode_quote.py File "unicode_quote.py&

[issue44324] add a "expected expression" syntax error

2021-06-17 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue44324> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44448] Suggestion: change existing error message for invalid function name

2021-06-17 Thread Andre Roberge
New submission from Andre Roberge : Consider the following two examples with the latest beta release: Python 3.10.0b3 ... >>> def 3job(x): File "", line 1 def 3job(x): ^ SyntaxError: invalid imaginary literal >>> def 3ob(x): F

[issue44447] Syntax Error not as detailed as shown

2021-06-17 Thread Andre Roberge
Andre Roberge added the comment: Your example is different than the one in the documentation (What's new). >>> (x, x for x in range(7)) # Your example File "", line 1 (x, x for x in range(7)) ^^^ SyntaxError: invalid syntax >>> foo(x, x for x in

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-19 Thread Andre Roberge
Andre Roberge added the comment: Would it be possible to add a single line of code to idlelib's pyshell.py, as indicated below: def showsyntaxerror(self, filename=None): """... """ linecache.cache[""] = linecache.cache[filename

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-20 Thread Andre Roberge
Andre Roberge added the comment: I just thought of making a copy of the file content under a known name as the least disruptive approach for IDLE's code - even less so than the recent addition required to support user-defined exception hooks. For SyntaxErrors and subclasses [1], Friendly

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-22 Thread Andre Roberge
Andre Roberge added the comment: I can confirm that, if the existing line type, value, tb = sys.exc_info() in pyshell.ModifiedInterpreter.showsyntaxerror is replaced by e_type, value, tb = sys.exc_info() err = str((type(e_type).__name__, *value)+'\n' linecache.cache[""] = (len(err

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-21 Thread Andre Roberge
Andre Roberge added the comment: Having a fake file with a single line containing all the exception information as described would definitely provide all the required information needed. It would be much better than what I had suggested previously

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-21 Thread Andre Roberge
Andre Roberge added the comment: Unless I am mistaken, when compiling the code, both SyntaxError and OverflowError instances are caught at the same stage, and likely passed on to showsyntaxerror. For OverflowError, e.args is not normally a tuple but a string, and *e.args[1] would raise

[issue44369] Improve syntax error for wrongly closed strings

2021-06-09 Thread Andre Roberge
Andre Roberge added the comment: I like this. While it would be a bit longer, I'm wondering if the message should not read instead as follows: ... Did you use the same quotes here as those enclosing the string? === I suspect that errors coming from the use of a single quote, as in: 'Don't

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Andre Roberge
Andre Roberge added the comment: I believe that this is similar to, but not quite as severe as a similar bug in code.interact() https://bugs.python.org/issue43366 which affects IDLE; perhaps fixing this might fix the other issue? -- nosy: +aroberge

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Andre Roberge
New submission from Andre Roberge : Consider the following in Python 3.10 >>> ... = 1 File "", line 1 ... = 1 ^^^ SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of '='? >>> __debug__ = 1 File "", line 1 SyntaxError

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Andre Roberge
Andre Roberge added the comment: I observe something similar, though with different symbols. My Windows installation uses French (fr-ca) as default language. === help> COMPARISON Comparisons *** ... Formally, if *a*, *b*, *c*, à, *y*, *z* are expressions and *op1*, *op2*, à, *

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Andre Roberge
Andre Roberge added the comment: Up to your best judgment Pablo - and thanks for your ongoing work on improving error messages. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Andre Roberge
Andre Roberge added the comment: > > I think that the suggestion to explicitly refer to '...' instead of the name Ellipsis would be preferable. Aside: I had not realized that this was done at a different stage for __debug__ and Ellipsis ("Ignorance is bliss"...

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Andre Roberge
Andre Roberge added the comment: Terry: I just checked with Idle on Windows with Python 3.9.5 and the display works perfectly, with no incorrect characters. -- ___ Python tracker <https://bugs.python.org/issue44

[issue37041] IDLE: path browser unusable on some displays

2021-06-03 Thread Andre Roberge
Change by Andre Roberge : -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue37041> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Andre Roberge
Andre Roberge added the comment: While I filed the original report, I am in agreement that accurate information for debugging tools is definitely more important than the quick summary shown in the traceback, and that the change likely represents an improvement in situations more realistic

[issue11343] Make errors due to full parser stack identifiable

2021-07-08 Thread Andre Roberge
Andre Roberge added the comment: For information: I created an actual .py file from the last example with 200 parens and got the following error message: > python example.py s_push: parser stack overflow MemoryError For consistency and greater clarity, I think that having messa

[issue11343] Make errors due to full parser stack identifiable

2021-07-08 Thread Andre Roberge
Andre Roberge added the comment: @pablo: Sincere apologies ... I tested this with the wrong virtual environment active locally. With 3.10, it is indeed SyntaxError: too many nested parentheses -- ___ Python tracker <https://bugs.python.

[issue43950] Include column offsets for bytecode instructions

2021-06-29 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue43950> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-28 Thread Andre Roberge
Andre Roberge added the comment: I made an error in my previous comment: the code I wrote is obviously incorrect as it contains a SyntaxError. -- ___ Python tracker <https://bugs.python.org/issue43

[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Andre Roberge
New submission from Andre Roberge : Consider the following program # example.py one = 1 two = "two" a = [one . two] Running this program with Python versions before 3.10, yields the following traceback: Traceback (most recent call last): File "C:\Users\andre\exam

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Andre Roberge
New submission from Andre Roberge : When an equal sign is used instead of a colon in creating a dict literal, depending on the context, either the "bad token" is misidentified OR the would-be helpful error message is incorrect in this particular case. 1) Example of bad token.

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Andre Roberge
Andre Roberge added the comment: In the second case, I understand very well that it could have been a set literal. In my (limited) experience, I have never seen a set literal containing a single element obtained from an == comparison. Since dict can be built by using keyword arguments, I

[issue44181] SyntaxError in Python 3.10.0b1: wrong token for missing comma

2021-05-19 Thread Andre Roberge
New submission from Andre Roberge : When forgetting a comma in writing a dict literal spanning multiple lines, the "bad token" is wrongly idenfied with Python 3.10.0b1. >>> a = {'a': 1 ... 'b': 2 File "", line 1 a = {'a': 1 ^ SyntaxError

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-04-25 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue43914> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-05 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue44026> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43163] code.interact() unexpectedly raises exception when there may be more code

2021-02-08 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue43163> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43748] Inconsistent grammar in new error message (introduced in 3.10.0a7)

2021-04-06 Thread Andre Roberge
New submission from Andre Roberge : Python version 3.10.0a7 added a more informative error message for: >>> f"{**k}" File "", line 1 (**k) ^ SyntaxError: f-string: can't use double starred expression here Previously, the message was simply "

[issue43748] Inconsistent grammar in new error message (introduced in 3.10.0a7)

2021-04-06 Thread Andre Roberge
Andre Roberge added the comment: Since all the messages I track so far (https://github.com/aroberge/friendly/blob/master/friendly/syntax_errors/message_analyzer.py) had been changed when going from 6.7 to 3.8, I had (incorrectly) assumed that all such error messages been changed to use

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-03-11 Thread Andre Roberge
New submission from Andre Roberge : As a result of https://bugs.python.org/issue43008, IDLE now supports custom exception hook for almost all cases except for code entered in the interactive shell that result in SyntaxError. It would be useful for some applications if a way to replace

[issue43555] Location of SyntaxError with new parser missing (after continuation character)

2021-03-19 Thread Andre Roberge
New submission from Andre Roberge : Normally, for SyntaxErrors, the location of the error is indicated by a ^. There is at least one case where the location is missing for 3.9 and 3.10.0a6 where it was shown before. Using the old parser for 3.9, or with previous versions of Python

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-02 Thread Andre Roberge
Andre Roberge added the comment: I understand the challenge of reproducing the behaviour of the Python interpreter for this case. If it cannot be reproduced, then the documentation for https://docs.python.org/3/library/code.html#code.InteractiveConsole.interact and others on that page

[issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING

2021-02-23 Thread Andre Roberge
Andre Roberge added the comment: Thonny has its own discussion site where you can report such problems: https://groups.google.com/g/thonny -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue43

[issue43859] Improve syntax error for indentation errors

2021-04-16 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue43859> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38530] Offer suggestions on AttributeError and NameError

2021-04-14 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue38530> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43797] Improve syntax error for invalid comparisons

2021-04-09 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue43797> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43149] Misleading error message for except with missing parens (3.10.a5)

2021-02-06 Thread Andre Roberge
New submission from Andre Roberge : The following: try: pass except ValueError, NameError as err: pass results in: except ValueError, NameError as err: ^ SyntaxError: expected ':' However, what is missing here are some parentheses surrounding the exception

[issue34013] Inconsistent SyntaxError for print

2021-02-19 Thread Andre Roberge
Andre Roberge added the comment: +1 to the idea of adding something to the grammar, and have a simple error message: SyntaxError: Missing parentheses in call to 'print'. in *all* cases, including the first one that prompted this bug report. I write that even though I have created a third

[issue18163] Add a 'key' attribute to KeyError

2021-02-18 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue18163> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
Andre Roberge added the comment: Based on what I just read on https://github.com/davidhalter/parso/blob/master/parso/python/issue_list.txt I gather that this exception is only raised in the context of an import statement with a trailing comma (usually followed by nothing

[issue45000] del __debug__ should be a SyntaxError

2021-08-25 Thread Andre Roberge
New submission from Andre Roberge : Consider the following: Python 3.10.0rc1 ... >>> __debug__ True >>> del __debug__ Traceback (most recent call last): File "", line 1, in NameError: name '__debug__' is not defined >>> __debug__ True >>> _

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
New submission from Andre Roberge : Consider the following four slightly different examples: Python 3.10.0rc1 ... >>> from math import sin and cos File "", line 1 from math import sin and cos ^^^ SyntaxError: invalid syntax >>&g

[issue44947] SyntaxError: trailing comma not allowed ... misleading

2021-08-18 Thread Andre Roberge
Andre Roberge added the comment: This message is not new to Python 3.10 as it is also shown with Python 3.9.5. >>> from math import sin, cos, and tan File "", line 1 from math import sin, cos, and tan ^ SyntaxError: trailing comma

[issue24612] not operator expression raising a syntax error

2021-09-04 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue24612> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44780] Incorrect message: "Invalid decimal literal" (python 3.10)

2021-07-30 Thread Andre Roberge
Andre Roberge added the comment: Here's another related case. Python 3.9: >>> a = 1½ File "", line 1 a = 1½ ^ SyntaxError: invalid character '½' (U+00BD) Python 3.10 >>> a = 1½ File "", line 1 a = 1½

[issue44780] Incorrect message: "Invalid decimal literal" (python 3.10)

2021-07-30 Thread Andre Roberge
Andre Roberge added the comment: Third case. Showing only the output for Python 3.10 >>> a = 3 ⁄ 7 # entered with a space around ⁄ File "", line 1 a = 3 ⁄ 7 ^ SyntaxError: invalid character '⁄' (U+2044) >>> a = 3⁄7# no added space

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Andre Roberge
Andre Roberge added the comment: I have no idea how the parser works ... but when you do the test to identify if an 'else' is missing, could the fact that there is a colon instead of the expected 'else' be used to avoid misidentifying this case? Note: I am keenly aware of the difficulties

[issue34013] Inconsistent SyntaxError for print

2021-08-10 Thread Andre Roberge
Andre Roberge added the comment: Python 3.10.0rc1 ... >>> print hello world! File "", line 1 print hello world! ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? The hint given is not exactly helpful ... (This example was in a discussio

[issue44780] Incorrect message: "Invalid decimal literal" (python 3.10)

2021-07-30 Thread Andre Roberge
New submission from Andre Roberge : Consider the following: >>> a = (1‚ 2) # not a comma, but unicode character. Using Python 3.9 (and earlier), we get the following correct information >>> a = (1‚ 2) File "", line 1 a = (1‚ 2) ^ SyntaxError: i

[issue44792] Improve syntax errors for invalid if expressions

2021-07-31 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue44792> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44838] SyntaxError: New message "expected 'else' after 'if' expression" wrongly shown

2021-08-05 Thread Andre Roberge
New submission from Andre Roberge : Given the following code containing no if expression (only if statements): if True: print('hello' if 2: print(123)) The following traceback is generated in Python 3.10.0RC1 File "...\example.py", line 2 pr

[issue45450] Improve syntax error for parenthesized arguments

2021-10-12 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue45450> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45560] sys.last_* not set for SyntaxErrors with IDLE

2021-10-21 Thread Andre Roberge
New submission from Andre Roberge : As stated in the documentation, sys.last_type, sys.last_value and sys.last_traceback ... are set when an exception is not handled and the interpreter prints an error message and a stack traceback. This is true whether the exception is a SyntaxError or some

[issue45560] sys.last_* not set for SyntaxErrors with IDLE

2021-10-21 Thread Andre Roberge
Andre Roberge added the comment: If this can be implemented, then I believe that https://bugs.python.org/issue43476 could be closed as well. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45450] Improve syntax error for parenthesized arguments

2021-10-12 Thread Andre Roberge
Andre Roberge added the comment: +1 on adding better error messages for these cases. I also agree with having different explanations with lambda and def. Below is what I have with friendly-traceback: perhaps the first line of both of these might be suitable? (I will likely change

[issue44780] Incorrect message: "Invalid decimal literal" (python 3.10)

2021-12-26 Thread Andre Roberge
Andre Roberge added the comment: The last of these three cases (with FRACTION SLASH) is fixed 3.10.1. The other two are still present in 3.10.1 and in 3.11.0a3 -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue44

[issue46240] Incorrect hint about forgetting a comma

2022-01-03 Thread Andre Roberge
New submission from Andre Roberge : Given the following code containing an unclosed parenthesis: a = (1, 2 b = 3 Here is the resulting SyntaxError: > python ignore.py File "C:\...\ignore.py", line 1 a = (1, 2 ^ SyntaxError: invalid syntax. Perhaps you f

[issue45801] Incorrect "Perhaps you forgot a comma" hint

2021-11-13 Thread Andre Roberge
New submission from Andre Roberge : Python 3.10 and 3.11: >>> sum[i for i in [1, 2, 3] if i%2==0] File "", line 1 sum[i for i in [1, 2, 3] if i%2==0] ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Furthe

[issue45812] SystemError when using code.interact

2021-11-15 Thread Andre Roberge
New submission from Andre Roberge : In the following, I execute a single invalid statement in the Python interpreter, which gives the correct error message. Afterwards, I repeat this example using code.interact(), generating a different traceback. This issue affects IDLE differently as shown

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue45807> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45811] Improve error message when source code contains invisible control characters

2021-11-15 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker <https://bugs.python.org/issue45811> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45801] Incorrect "Perhaps you forgot a comma" hint

2021-11-13 Thread Andre Roberge
Andre Roberge added the comment: I understand. I reported this issue when one of my newest tests failed with Python 3.10 and 3.11. Actually, using friendly-traceback, using the location of the exception as indicated by cPython 3.10 and 3.11, here's part of the explanation it gives

  1   2   >