[issue41681] f-string error description seems wrong

2020-08-31 Thread Hanish


New submission from Hanish :

There seems to an error in the `f-string` error description when one do:


>>> f'{1:,,}'
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Cannot specify both ',' and '_'.
>>> 

The error seems to be that, i am not specifying both ',' and '_', but it does 
seem to think so.

This also seems to be happening for `str.format`:

>>> '{:,,}'.format(1)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Cannot specify both ',' and '_'.


So i was just wondering if this is an issue worth raising :)


Thank you

--
components: Interpreter Core
messages: 376160
nosy: eric.smith, han-solo
priority: normal
severity: normal
status: open
title: f-string error description seems wrong
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue41681] f-string error description seems wrong

2020-08-31 Thread Hanish


Hanish  added the comment:

Sure. Thanks for the quick response :)

Let me see if i can try to come up with something :)

--
versions: +Python 3.6, Python 3.7

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



[issue41681] f-string error description seems wrong

2020-08-31 Thread Hanish


Change by Hanish :


--
keywords: +patch
pull_requests: +21134
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22036

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



[issue41681] f-string error description seems wrong

2020-08-31 Thread Hanish


Hanish  added the comment:

I have raised a pull request for the fix 
https://github.com/python/cpython/pull/22036. Your review is appreciated :)

--

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



[issue41681] f-string error description seems wrong

2020-09-01 Thread Hanish


Change by Hanish :


--
pull_requests: +21150
pull_request: https://github.com/python/cpython/pull/22059

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