[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-03-14 Thread Ethan Furman

Ethan Furman added the comment:

Added in
https://hg.python.org/peps/rev/7fe79194a4f2

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-03-11 Thread STINNER Victor

STINNER Victor added the comment:

You should also update the PEP 461.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-03-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 611fa301b807 by Ethan Furman in branch 'default':
Close issue23467: add %r compatibility to bytes and bytearray
https://hg.python.org/cpython/rev/611fa301b807

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-16 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread STINNER Victor

STINNER Victor added the comment:

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.

I don't like this idea.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Serhiy Storchaka

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 rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Yeah, we probably got carried away by purity concerns.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Ethan Furman

Ethan Furman added the comment:

Sometimes practicality wins; it's why we allow %s, and we should also allow %r.

Both %s and %r need to be clearly documented as an aid to Py2/3 code bases, and 
not recommended for new code.

Serhiy, do you have time to take of this?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The implementation is easy -- just add case 'r': before case 'a':. The hard 
(to me) part is the documentation, so that I'm out of the game.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-15 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
assignee:  - ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com