Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format() function prints fillchar as backslash twice #74506

Closed
pradeepkr mannequin opened this issue May 9, 2017 · 2 comments
Closed

format() function prints fillchar as backslash twice #74506

pradeepkr mannequin opened this issue May 9, 2017 · 2 comments

Comments

@pradeepkr
Copy link
Mannequin

pradeepkr mannequin commented May 9, 2017

BPO 30321
Nosy @zware

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-05-09.19:49:19.549>
created_at = <Date 2017-05-09.19:45:12.429>
labels = ['invalid']
title = 'format() function prints fillchar as backslash twice'
updated_at = <Date 2017-05-09.19:49:19.548>
user = 'https://bugs.python.org/pradeepkr'

bugs.python.org fields:

activity = <Date 2017-05-09.19:49:19.548>
actor = 'zach.ware'
assignee = 'none'
closed = True
closed_date = <Date 2017-05-09.19:49:19.549>
closer = 'zach.ware'
components = []
creation = <Date 2017-05-09.19:45:12.429>
creator = 'pradeepkr'
dependencies = []
files = []
hgrepos = []
issue_num = 30321
keywords = []
message_count = 2.0
messages = ['293343', '293344']
nosy_count = 2.0
nosy_names = ['zach.ware', 'pradeepkr']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue30321'
versions = ['Python 3.6']

@pradeepkr
Copy link
Mannequin Author

pradeepkr mannequin commented May 9, 2017

The output expected is,
'\R\'

but it shows this.

>>> '{:\^3}'.format('R')
'\\R\\'
>>>

@zware
Copy link
Member

zware commented May 9, 2017

>>> result = '{:\^3}'.format('R')
>>> result
'\\R\\'
>>> print(result)
\R\
>>> print("backslash (\\) is escaped by another backslash in str's repr")
backslash (\) is escaped by another backslash in str's repr

@zware zware closed this as completed May 9, 2017
@zware zware added the invalid label May 9, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant