Re: [Python-3000] PyBytes_FromObject

2008-06-28 Thread Benjamin Peterson
On Sat, Jun 28, 2008 at 11:38 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sat, Jun 28, 2008 at 8:47 AM, Benjamin Peterson > <[EMAIL PROTECTED]> wrote: >> On Sat, Jun 28, 2008 at 10:33 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >>> Seems to make sense. Do you see many places where it w

Re: [Python-3000] PyBytes_FromObject

2008-06-28 Thread Guido van Rossum
On Sat, Jun 28, 2008 at 11:30 AM, Brett Cannon <[EMAIL PROTECTED]> wrote: > On Sat, Jun 28, 2008 at 8:33 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> Seems to make sense. Do you see many places where it would make >> existing code shorter? > If it could be used to get the bytes from a file o

Re: [Python-3000] PyBytes_FromObject

2008-06-28 Thread Brett Cannon
On Sat, Jun 28, 2008 at 8:33 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Seems to make sense. Do you see many places where it would make > existing code shorter? > If it could be used to get the bytes from a file object, then marshal.c could use it; the code calls the "read" method on file o

Re: [Python-3000] PyBytes_FromObject

2008-06-28 Thread Guido van Rossum
On Sat, Jun 28, 2008 at 8:47 AM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > On Sat, Jun 28, 2008 at 10:33 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> Seems to make sense. Do you see many places where it would make >> existing code shorter? > > It's a good way to convert a bytearray to by

Re: [Python-3000] PyBytes_FromObject

2008-06-28 Thread Benjamin Peterson
On Sat, Jun 28, 2008 at 10:33 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Seems to make sense. Do you see many places where it would make > existing code shorter? It's a good way to convert a bytearray to bytes. -- Cheers, Benjamin Peterson "There's no place like 127.0.0.1." _

Re: [Python-3000] PyBytes_FromObject

2008-06-28 Thread Guido van Rossum
Seems to make sense. Do you see many places where it would make existing code shorter? On Sat, Jun 28, 2008 at 6:46 AM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > It seems PyBytes is missing the parallel call for > PyByteArray_FromObject. Should I add it? -- --Guido van Rossum (home page: ht