[issue40250] unable to comment out r'\u' string with triple quote marks

2022-01-23 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue40250] unable to comment out r'\u' string with triple quote marks

2020-04-10 Thread Vedran Čačić

Vedran Čačić  added the comment:

This "bug" is reported at least once a year, by different people. Maybe we 
should put something in the documentation, to the effect that

a) as Eric said, triple-quoted strings are not (meant to be used as) comments

b) if you nonetheless really want to use them that way, in most cases you _can_ 
get away with using r'''...'''.

--
nosy: +veky

___
Python tracker 

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



[issue40250] unable to comment out r'\u' string with triple quote marks

2020-04-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

This basically comes down to """\u""" not being a valid string.

I'm not sure why you'd expect this to work: triple quoted strings are not 
designed as a general purpose "comment out" facility, and as you've discovered, 
they don't work that way. What's inside a triple quoted string must be 
interpretable as a python string, which in this case it is not.

--
nosy: +eric.smith

___
Python tracker 

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



[issue40250] unable to comment out r'\u' string with triple quote marks

2020-04-10 Thread Elmar Bucher


Change by Elmar Bucher :


--
type:  -> compile error

___
Python tracker 

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



[issue40250] unable to comment out r'\u' string with triple quote marks

2020-04-10 Thread Elmar Bucher


New submission from Elmar Bucher :

When I try to comment out this little code by triple quotation, 
I run into
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in 
position 29-30: truncated \u escape

ls_tex = []
ls_tex.append(r'\usepackage{mathtools}')
print(ls_tex)

Basically it is not possible to use r'\u' and comment it out with ''' or """. I 
think this should not be the case, this is an interpreter error.

--
components: Interpreter Core
messages: 366166
nosy: Elmar Bucher
priority: normal
severity: normal
status: open
title: unable to comment out r'\u' string with triple quote marks
versions: Python 3.7

___
Python tracker 

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