Re: [Python-Dev] 3.0 C API to decode bytes into unicode?

2008-08-02 Thread Barry Scott
On Aug 1, 2008, at 14:30, M.-A. Lemburg wrote: On 2008-08-01 15:06, Barry Scott wrote: I cannot see how I implement decode() for bytes objects using the C API for PyCXX library, I'd assuming that I should find a PyBytes_Decode function but cannot find it in beta 2. What is the preferred w

Re: [Python-Dev] Base-96

2008-08-02 Thread Kless
It's true, I didn't pay attention to that. So the next encoding possible would of base-128 (7-bits encoding), althought I don't know if were possible since that there would than use non-printable characters and could change the text (by use of chars. as Backspace or Delete). On 2 ago, 03:21, Stev

Re: [Python-Dev] Base-96

2008-08-02 Thread Josiah Carlson
The standard high-bit-density encoding past base-64 is base-85 (http://en.wikipedia.org/wiki/Ascii85), which encodes 4 binary bytes as 5 ascii bytes, versus 3 binary bytes as 4 ascii bytes. It works, is an RFC somewhere, ... and maybe should find it's way into the Python standard library's codec p

Re: [Python-Dev] Base-96

2008-08-02 Thread Martin v. Löwis
Josiah Carlson wrote: > The standard high-bit-density encoding past base-64 is base-85 > (http://en.wikipedia.org/wiki/Ascii85), which encodes 4 binary bytes > as 5 ascii bytes, versus 3 binary bytes as 4 ascii bytes. It works, > is an RFC somewhere, RFC 1924, published on April 1, 1996, to short

Re: [Python-Dev] Base-96

2008-08-02 Thread Josiah Carlson
On Sat, Aug 2, 2008 at 10:09 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Josiah Carlson wrote: >> The standard high-bit-density encoding past base-64 is base-85 >> (http://en.wikipedia.org/wiki/Ascii85), which encodes 4 binary bytes >> as 5 ascii bytes, versus 3 binary bytes as 4 ascii bytes

Re: [Python-Dev] Base-96

2008-08-02 Thread Guido van Rossum
On Sat, Aug 2, 2008 at 10:37 AM, Josiah Carlson <[EMAIL PROTECTED]> wrote: > On Sat, Aug 2, 2008 at 10:09 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> Josiah Carlson wrote: >>> The standard high-bit-density encoding past base-64 is base-85 >>> (http://en.wikipedia.org/wiki/Ascii85), which en

Re: [Python-Dev] Base-85

2008-08-02 Thread Antoine Pitrou
Martin v. Löwis v.loewis.de> writes: > > P.S. Just in case it isn't clear: I would oppose any specific proposal > to add this Ascii85 algorithm to the standard library. It would sound > like we don't have any real problems to solve. According to Wikipedia, "its main modern use is in Adobe's Post

Re: [Python-Dev] Base-85

2008-08-02 Thread Guido van Rossum
On Sat, Aug 2, 2008 at 12:58 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > It is also used by git for diffs of binary files, and those diffs are > supposedly > understood by other VCSes like Mercurial... I'm very interested in this (for Rietveld). Where can I learn more about how git handles di

Re: [Python-Dev] Base-96

2008-08-02 Thread Guido van Rossum
On Sat, Aug 2, 2008 at 11:57 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > That was an April Fool's RFC. See also http://en.wikipedia.org/wiki/April_Fools%27_Day_RFC -- it has a ton of these. Great fun reading through some of them on an idle Saturday afternoon. :-) -- --Guido van Rossum (hom

Re: [Python-Dev] Base-85

2008-08-02 Thread Antoine Pitrou
Le samedi 02 août 2008 à 14:07 -0700, Guido van Rossum a écrit : > On Sat, Aug 2, 2008 at 12:58 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > > It is also used by git for diffs of binary files, and those diffs are > > supposedly > > understood by other VCSes like Mercurial... > > I'm very inter

[Python-Dev] What to do with uuid?

2008-08-02 Thread Brett Cannon
I was running the test suite and I noticed test_uuid's warning message is still up: test_uuid WARNING: uuid.getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._ifconfig_getnode is unreliable on many platforms.

[Python-Dev] Base-95 (Re: Base-96)

2008-08-02 Thread Greg Ewing
Kless wrote: So the next encoding possible would of base-128 (7-bits encoding) A while ago I wanted to pack as much information as possible into a string of printable characters, and I came up with a base-95 encoding that packs 9 bytes into 11 characters. The application involved representing