[issue44308] Raw Strings lack parody

Mark Dickinson report at bugs.python.org
Fri Jun 4 08:07:29 EDT 2021


Mark Dickinson <dickinsm at gmail.com> added the comment:

Ah, I think I see: you want a function that turns the string "foo\bar" into "foo\\bar". Even if this were a good idea, I don't think it's feasible to do it in a non-surprising way.

For example, given such a function f, what outputs would you expect for:

  (a) f("\012"), and
  (b) f("\n")?

(And yes, this is a trick question: "\012" and "\n" are the same string.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44308>
_______________________________________


More information about the Python-bugs-list mailing list