[Python-Dev] deprecating BaseException.message

2007-04-09 Thread Brett Cannon
During the PyCon sprint I tried to make BaseException accept only a single argument and bind it to BaseException.message . I was successful (see the p3yk_no_args_on_exc branch), but it was very painful to pull off as anyone who sat around me the last three days of the sprint will tell you as they

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

2007-04-09 Thread Travis Oliphant
Carl Banks wrote: > > > Travis Oliphant wrote: > > Py_BUF_READONLY > >The returned buffer must be readonly and the underlying object > should make > >its memory readonly if that is possible. > > I don't like the "if possible" thing. If it makes no guarantees, it > pretty much useless ove

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

2007-04-09 Thread Carl Banks
Travis Oliphant wrote: > Py_BUF_READONLY >The returned buffer must be readonly and the underlying object should make >its memory readonly if that is possible. I don't like the "if possible" thing. If it makes no guarantees, it pretty much useless over Py_BUF_SIMPLE. > Py_BUF_FORM

Re: [Python-Dev] function for counting items in a sequence

2007-04-09 Thread Delaney, Timothy (Tim)
Greg Ewing wrote: > Steven Bethard wrote: > >> * Greg Ewing - counteach(), countall() >> * Guido - counts() is fine > > I'm happy with counts() too -- I only suggested the > others in case counts() wasn't acceptable for some > reason. If Guido likes it, that's good enough for > me. I think I'd

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

2007-04-09 Thread Neil Hodgson
Travis Oliphant: > PEP: 3118 > ... I'd like to see the PEP include discussion of what to do when an incompatible request is received while locked. Should there be a standard "Can't do that: my buffer has been got" exception? Neil ___ Python-Dev m

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

2007-04-09 Thread Travis Oliphant
Changes: * added the "flags" variable to allow simpler calling for getbuffer. * added some explanation of ideas that were discussed and abandoned. * added examples for simple use cases. * added more C-API calls to allow easier usage. Thanks for all feedback. -Travis PEP: 3118 Title:

Re: [Python-Dev] Extended Buffer Protocol - simple use examples

2007-04-09 Thread Travis Oliphant
Paul Moore wrote: > Hi, > I'll admit right off that I haven't followed all of the extended > buffer protocol discussions - I have no real need for anything much > beyond the existing "here's a blob of memory" level of functionality. > > I have skimmed (briefly, I'll admit!) the pre-PEP, but I've f

[Python-Dev] Extended Buffer Protocol - simple use examples

2007-04-09 Thread Paul Moore
Hi, I'll admit right off that I haven't followed all of the extended buffer protocol discussions - I have no real need for anything much beyond the existing "here's a blob of memory" level of functionality. I have skimmed (briefly, I'll admit!) the pre-PEP, but I've found it extremely difficult to