[issue17618] base85 encoding

Antoine Pitrou report at bugs.python.org
Sun Apr 14 19:36:26 CEST 2013


Antoine Pitrou added the comment:

Hi and thanks for the patch!

> I named the Mercurial base85 implementation functions with the "b85"
> prefix. For the Ascii85 ones, I used "a85". I considered overloading
> the same functions with a keyword argument to select which encoding,
> but rejected that. Thoughts?

I agree, it's better like this.

> I haven't made the changes to add a pure Python binascii module as
> suggested in msg186216. Although poorly named, "base64.py" already contains 
> a number of other encodings, so this seemed the best place for these too.

Yes, I think it's ok. I was thinking about binascii in the context of making a C version, but we can refactor things later anyway.

Now about the patch: I haven't read it in detail, but it seems to lack tests for b85decode and b85encode. It should be easy enough to get some test values by calling Mercurial's version.

----------

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


More information about the Python-bugs-list mailing list