[New-bugs-announce] [issue23467] Improve byte formatting compatibility between Py2 and Py3

Serhiy Storchaka report at bugs.python.org
Sun Feb 15 19:33:27 CET 2015


New submission from Serhiy Storchaka:

The main motivation of PEP 461 was to help ease migration from, and/or have a single code base with, Python 2. But bytes formatting don't support the %r code supported in Python 2. Instead it supports the %a code which is exactly equivalent to the %r code in Python 2 but doesn't supported in Python 2. So it is not so easy to migrate from or have a single code base with Python 2 it the code uses the %r opcode.

As far as bytes formatting supports the %s code (an alias to %b) purely for compatibility with Python 2, it would be good to support the %r as an alias to %a.

----------
components: Interpreter Core
messages: 236057
nosy: ethan.furman, gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve byte formatting compatibility between Py2 and Py3
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23467>
_______________________________________


More information about the New-bugs-announce mailing list