Re: [Python-3000] PEP 344: attaching tracebacks to exceptions + pickle

2007-04-12 Thread Josiah Carlson
"Collin Winter" <[EMAIL PROTECTED]> wrote: > In 2.x, exceptions are pickle-able; tracebacks, however, are not. If > tracebacks are attached to exceptions in Python 3 (as specified in PEP > 344), exceptions will no longer be pickle-able. I know that idlelib packages tracebacks for transfer across

[Python-3000] PEP 344: attaching tracebacks to exceptions + pickle

2007-04-12 Thread Collin Winter
In 2.x, exceptions are pickle-able; tracebacks, however, are not. If tracebacks are attached to exceptions in Python 3 (as specified in PEP 344), exceptions will no longer be pickle-able. There are of course options: 1. Discard an exception's __traceback__ attribute when pickling. 2. Include __t

Re: [Python-3000] [Python-Dev] PEP 3118: Extended buffer protocol (new version)

2007-04-12 Thread Greg Ewing
Lisandro Dalcin wrote: > What about keeping flags it provides instead of the > requested ones? It's hard to guess what kind of info the exporter might want to keep. May there could just be a general-purpose void * field in the bufferinfo for the exporter to use however it wants. -- Greg ___

Re: [Python-3000] [Python-ideas] Implicit String Concatenation

2007-04-12 Thread Greg Ewing
For Py3k, how about changing the definition of triple quoted strings so that indentation is stripped up to the level of the line where the string began? In other words, apply an implicit dedent() to it in the parser. -- Greg ___ Python-3000 mailing list

Re: [Python-3000] Line continuation using ellipsis

2007-04-12 Thread Greg Ewing
Talin wrote: > I've never liked using the backslash operator for line continuation How about regarding a line as a continuation if it's indented more than the one which started the statement? > 1) It requires that it be the last character of a line, That requirement could be removed, couldn't i

Re: [Python-3000] [Python-3000-checkins] r54742 - in python/branches/p3yk/Lib: io.py test/test_io.py

2007-04-12 Thread Guido van Rossum
> >> > I wonder if it would be possible to return the state as a pair > >> > (unread, flags) where unread is a (byte) string of unprocessed bytes > >> > and flags is some other state, with the constraint that in the initial > >> > state the flags must be zero. Then I can optimize the case where fla

Re: [Python-3000] [Python-3000-checkins] r54742 - in python/branches/p3yk/Lib: io.py test/test_io.py

2007-04-12 Thread Walter Dörwald
Guido van Rossum wrote: > On 4/12/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: >> Guido van Rossum wrote: >> > On 4/11/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: >> >> Would it make sense to make the state of the decoder public, e.g. by >> >> adding setstate() and getstate() methods? This woul

Re: [Python-3000] Marshal Version and Pickle Protocols

2007-04-12 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 12, 2007, at 1:34 PM, Guido van Rossum wrote: > On 4/12/07, Barry Warsaw <[EMAIL PROTECTED]> wrote: >> On Apr 12, 2007, at 12:57 PM, Guido van Rossum wrote: >> >> > On 4/12/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> >> Can we drop the

Re: [Python-3000] Marshal Version and Pickle Protocols

2007-04-12 Thread Guido van Rossum
On 4/12/07, Barry Warsaw <[EMAIL PROTECTED]> wrote: > On Apr 12, 2007, at 12:57 PM, Guido van Rossum wrote: > > > On 4/12/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > >> Can we drop the old protocols? > > > > I'd like to keep supporting the old pickle for data > > interchangeability, but defa

Re: [Python-3000] [Python-3000-checkins] r54742 - in python/branches/p3yk/Lib: io.py test/test_io.py

2007-04-12 Thread Guido van Rossum
On 4/12/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > On 4/11/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: > >> Would it make sense to make the state of the decoder public, e.g. by > >> adding setstate() and getstate() methods? This would give a cleaner API. > > > > I

Re: [Python-3000] Marshal Version and Pickle Protocols

2007-04-12 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Apr 12, 2007, at 12:57 PM, Guido van Rossum wrote: > On 4/12/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> Can we drop the old protocols? > > I'd like to keep supporting the old pickle for data > interchangeability, but default to pickle prot

Re: [Python-3000] Marshal Version and Pickle Protocols

2007-04-12 Thread Robert Brewer
Guido van Rossum wrote: > On 4/12/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > Can we drop the old protocols? > > I'd like to keep supporting the old pickle for data > interchangeability, but default to pickle protocol 2, which has been > supported by Python for several versions. I still

Re: [Python-3000] Marshal Version and Pickle Protocols

2007-04-12 Thread Guido van Rossum
On 4/12/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Can we drop the old protocols? I'd like to keep supporting the old pickle for data interchangeability, but default to pickle protocol 2, which has been supported by Python for several versions. I'm not aware of Marshal protocol versions.

[Python-3000] Marshal Version and Pickle Protocols

2007-04-12 Thread Raymond Hettinger
Can we drop the old protocols? Raymond ___ Python-3000 mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Re: [Python-3000] [Python-3000-checkins] r54742 - in python/branches/p3yk/Lib: io.py test/test_io.py

2007-04-12 Thread Walter Dörwald
Guido van Rossum wrote: > On 4/11/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: >> Would it make sense to make the state of the decoder public, e.g. by >> adding setstate() and getstate() methods? This would give a cleaner API. > > I've been thinking of the same thing! > > I wonder if it would be