[issue29071] IDLE doesn't highlight f-strings properly

2017-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#29287 is about syntax highlighting the code within f-strings as code rather 
than as part of the string.

--

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2017-01-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The doc appears to be carefully accurate, but the second sentence especially is 
a bit awkward.  I will open a new issue.

--

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2017-01-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for advertising  the new feature. Would you like to improve the 
documentation? It always was the hardest part to me.

--

___
Python tracker 

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




[issue29071] IDLE doesn't highlight f-strings properly

2017-01-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thank you for the new feature (I presume) and its application.  I disliked both 
writing and reading all the near duplication.  I am posting this to python-list 
as an example of what the new feature is good for.

--

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2017-01-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 62d3c0336df6 by Terry Jan Reedy in branch '3.6':
Issue #29071: Use local flags for IDLE colorizer string prefix matcher.
https://hg.python.org/cpython/rev/62d3c0336df6

--

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The regular expression can be simplified using local flags:

-stringprefix = (r"(\br|R|u|U|f|F|fr|Fr|fR|FR|rf|rF|Rf|RF"
-"|b|B|br|Br|bR|BR|rb|rB|Rb|RB)?")
+stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?"

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-26 Thread Ammar Askar

Ammar Askar added the comment:

Not a problem, thank you for the encouragement.

--

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There are 10 possible f-string prefixes, including combinations with r/R.  See
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals

While adding these, I noticed that IDLE was coloring now invalid ur prefixes 
and deleted those.

I decided to test by modifying the existing human visual htest.

Ammar: thank you for submitting a patch.  It happens that I wrote my patch 
before I saw your submission.  If I had seen yours first, I might have given 
you a chance to finish it.  Feel free to try another IDLE issue.

--
resolution:  -> fixed
stage: patch review -> 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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a48cc85e5706 by Terry Jan Reedy in branch '3.6':
Issue #29071: IDLE now colors f-string prefixes (but not invalid ur prefixes).
https://hg.python.org/cpython/rev/a48cc85e5706

--
nosy: +python-dev

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-26 Thread Ammar Askar

Ammar Askar added the comment:

I've attached a patch that colorizes f-strings.

The issue is marked as "test needed" which the dev guide says "... reporter 
should post a script or instructions to let a triager or developer reproduce 
the issue." 

Steps to re-create are to open an IDLE window and type in the code
```
f"123"
F"123"
u"123"
```
and notice the colorization difference.

--
keywords: +patch
nosy: +ammar2
stage: test needed -> patch review
Added file: http://bugs.python.org/file46048/idle-f-string-highlight.diff

___
Python tracker 

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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed
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



[issue29071] IDLE doesn't highlight f-strings properly

2016-12-25 Thread Kenzie Togami

New submission from Kenzie Togami:

IDLE doesn't highlight f-strings like r-strings or u-strings. See the attached 
screenshot.

--
assignee: terry.reedy
components: IDLE
files: python_idle_3.6_bug.png
messages: 284010
nosy: Kenzie Togami, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE doesn't highlight f-strings properly
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file46037/python_idle_3.6_bug.png

___
Python tracker 

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