This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: format() function prints fillchar as backslash twice
Type: Stage: resolved
Components: Versions: Python 3.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: pradeepkr, zach.ware
Priority: normal Keywords:

Created on 2017-05-09 19:45 by pradeepkr, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg293343 - (view) Author: PradeepKumar (pradeepkr) Date: 2017-05-09 19:45
The output expected is,

but it shows this.

>>> '{:\^3}'.format('R')
msg293344 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2017-05-09 19:49
>>> result = '{:\^3}'.format('R')
>>> result
>>> print(result)
>>> print("backslash (\\) is escaped by another backslash in str's repr")
backslash (\) is escaped by another backslash in str's repr
Date User Action Args
2022-04-11 14:58:46adminsetgithub: 74506
2017-05-09 19:49:19zach.waresetstatus: open -> closed

nosy: + zach.ware
messages: + msg293344

resolution: not a bug
stage: resolved
2017-05-09 19:45:12pradeepkrcreate