[issue39625] Traceback needs more details

2020-02-13 Thread Andrew Wall


New submission from Andrew Wall :

I encountered a question on Stackoverflow where, unusually, a Traceback was 
given in full, but I couldn't diagnose the problem.

It was like this:

Traceback (most recent call last):
  File "soFailedTraceback.py", line 15, in 
c = C(C1("C1"), C2("C2"))
TypeError: __init__() missing 1 required positional argument: 'p'

What I am claiming is missing is info about class C1:
  File "soFailedTraceback.py", line 8, in 
def __init__(self, s1, p):


Here is the file soFailedTraceback.py:
#soFailedTraceback

class C:
def __init__(self, c1, p):
pass

class C1:
def __init__(self, s1, p):
pass

class C2:
def __init__(self, s1):
pass

c = C(C1("C1"), C2("C2"))

I find the Traceback confusing, because it so happens there are two classes 
which have required positional argument "p", but python does not directly show 
which class it is.

--
messages: 361953
nosy: Andrew Wall
priority: normal
severity: normal
status: open
title: Traceback needs more details
type: enhancement
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue39625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31253] Python fails to parse commented out code

2017-08-22 Thread Andrew Wall

Andrew Wall added the comment:

My lazy way of programming is to piece together lines of code, going round and 
round commenting and uncommenting sections until I get something that works.

My new lazy way of commenting out larger chunks of code will be:

r'''
... several lines of code here ...
'''

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31253>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31253] Python fails to parse commented out code

2017-08-22 Thread Andrew Wall

New submission from Andrew Wall:

Python can parse and run this code:

log = list(r'..\Unknown\*.txt')


but not this:

'''
log = list(r'..\Unknown\*.txt')
'''

--
components: Interpreter Core
messages: 300670
nosy: quamrana
priority: normal
severity: normal
status: open
title: Python fails to parse commented out code
type: compile error
versions: Python 3.6

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31253>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com