Re: [Python-3000] Thoughts on new I/O library and bytecode

2007-02-24 Thread Guido van Rossum
Why not add the literal to 2.6 too? If that's deemed undesirable, make it bytes(), as long as that actually works when read back. --Guido On 2/24/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Guido van Rossum schrieb: > > Georg is channeling me well. Also, my thinking has evolved some after > >

Re: [Python-3000] Bytes <-> string conversion methods

2007-02-24 Thread Guido van Rossum
Yup, that was a typo. Someone else noticed it too. It's fixed in the version of the slides I'll post to python.org. --Guido On 2/24/07, Ka-Ping Yee <[EMAIL PROTECTED]> wrote: > Hi Guido, > > I'm in your keynote and looking at a slide right now that says > > * bytes has .encode() method return

[Python-3000] Pre-PEP: Altering buffer protocol (tp_as_buffer)

2007-02-24 Thread Travis Oliphant
Hi everybody, It was great to see so many of you at PyCon --- even if we saw each other for too long during the PSF meeting. After hearing Guido's keynote talk today and realizing that the alpha release of Python 3.0 is so soon, I decided that the right approach I should take in pushing the

Re: [Python-3000] Transition to Python 3's raise syntax

2007-02-24 Thread Phillip J. Eby
At 03:27 PM 2/24/2007 -0600, Collin Winter wrote: >Are "new-style" except clauses the ones spelled "except E as NAME" while >"old-style" ones are spelled "except E, NAME"? Yes. >What happens in this case: > >e = Exception() >e.__traceback__ = T1 >raise Exception, e, T2 > >Which traceback takes p

[Python-3000] Transition to Python 3's raise syntax

2007-02-24 Thread Collin Winter
(Finally getting back around to this) On 2/9/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: [snip] > Hm. Actually, that's not necessary. We could include .with_traceback(T) > in 2.6, and just have old-style except: clauses delete the traceback from > the returned objects. New-style except: claus

Re: [Python-3000] Thoughts on new I/O library and bytecode

2007-02-24 Thread Georg Brandl
Guido van Rossum schrieb: > Georg is channeling me well. Also, my thinking has evolved some after > talking to various folks here at PyCon. > > Georg, please check it in! Feel free to update the PEP if you will. I will, if you answer me one question: in Python 2.6, should the repr() return "bytes

[Python-3000] Bytes <-> string conversion methods

2007-02-24 Thread Ka-Ping Yee
Hi Guido, I'm in your keynote and looking at a slide right now that says * bytes has .encode() method returning a string * str has a .decode() method returning bytes Should the names of those two methods be swapped? I think it makes more sense to say that an encoding is something that t

Re: [Python-3000] Thoughts on new I/O library and bytecode

2007-02-24 Thread Guido van Rossum
Georg is channeling me well. Also, my thinking has evolved some after talking to various folks here at PyCon. Georg, please check it in! Feel free to update the PEP if you will. --Guido On 2/24/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Giovanni Bajo schrieb: > > On 24/02/2007 11.20, Georg Br

Re: [Python-3000] Thoughts on new I/O library and bytecode

2007-02-24 Thread Georg Brandl
Giovanni Bajo schrieb: > On 24/02/2007 11.20, Georg Brandl wrote: > >> Thomas Wouters schrieb: >>> >>> That's exactly what it does in current p3yk: >>> >>> Python 3.0x (p3yk:53867M, Feb 23 2007, 20:06:03) >>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>> Type "help", "copyright

Re: [Python-3000] Thoughts on new I/O library and bytecode

2007-02-24 Thread Giovanni Bajo
On 24/02/2007 11.20, Georg Brandl wrote: > Thomas Wouters schrieb: >> >> That's exactly what it does in current p3yk: >> >> Python 3.0x (p3yk:53867M, Feb 23 2007, 20:06:03) >> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >> Type "help", "copyright", "credits" or "license" for more

Re: [Python-3000] Thoughts on new I/O library and bytecode

2007-02-24 Thread Georg Brandl
Thomas Wouters schrieb: That's exactly what it does in current p3yk: Python 3.0x (p3yk:53867M, Feb 23 2007, 20:06:03) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> b"""abc ... def""" bytes([0x61, 0x62, 0