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.

Author mark.dickinson
Recipients Nicholas Willhite, ezio.melotti, mark.dickinson, steven.daprano, vstinner
Date 2021-06-04.11:58:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622807912.96.0.918982615129.issue44308@roundup.psfhosted.org>
In-reply-to
Content
> But there's no builtin function for r'foo\bar' that gives you 'foo\\bar'.

I'm confused about what's being requested here. r'foo\bar' and 'foo\\bar' are different source code representations of the exact same string (same type, same contents), so the identity function is such a function.

>>> f(r'foo\bar') == 'foo\\bar'
True

Nicholas: presumably you're after something more than the identity function. Can you clarify what the input and output types to your proposed function would be, and then give example input and output values?
History
Date User Action Args
2021-06-04 11:58:33mark.dickinsonsetrecipients: + mark.dickinson, vstinner, ezio.melotti, steven.daprano, Nicholas Willhite
2021-06-04 11:58:32mark.dickinsonsetmessageid: <1622807912.96.0.918982615129.issue44308@roundup.psfhosted.org>
2021-06-04 11:58:32mark.dickinsonlinkissue44308 messages
2021-06-04 11:58:32mark.dickinsoncreate