[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

Ethan Furman report at bugs.python.org
Tue Jan 6 17:04:41 CET 2015


Ethan Furman added the comment:

Here is what I have so far:

  - complete tests for bytes and bytearry (bytearray currently commented out at line 71)
  - pep461 implemented for bytes

This is basically an adaptation of the 2.7 code for str, adjusted appropriately.

I was planning on having bytearray convert to bytes, then call the bytes code, then integrate the results back into the existing bytearray (for %=) or create and return a new bytearray (for %).

I can easily believe this is not the most efficient way to do it.  ;)

I should have the bytearray portion done, if not this weekend, then by the following weekend.

I have no objections if Victor wants to combine and optimize with the unicode implementation (and no need to wait for me to finish the bytearray portion).

----------
Added file: http://bugs.python.org/file37616/issue20284.stoneleaf.01.patch

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


More information about the Python-bugs-list mailing list