Re: [Python-Dev] TextIO seek and tell cookies

2016-09-25 Thread Peter Ludemann via Python-Dev
On 25 September 2016 at 21:18, Guido van Rossum wrote: > Be careful though, comparing these to plain integers should probably > be allowed, ​There's a good reason why it's "opaque" ... why would you want to make it less opaque? And I'm curious why Python didn't adopt the

Re: [Python-Dev] Possibly inconsistent behavior in re groupdict

2016-09-25 Thread Guido van Rossum
Hi Gordon, You pose an interesting question that I don't think anyone has posed before. Having thought about it, I think that the keys in the group dict are similar to the names of variables or attributes, and I think treating them always as strings makes sense. For example, I might write a

Re: [Python-Dev] TextIO seek and tell cookies

2016-09-25 Thread Guido van Rossum
Be careful though, comparing these to plain integers should probably be allowed, and we also should make sure that things like serialization via JSON or storing in an SQL database don't break. I personally think it's one of those "learn not to touch the stove" cases and there's limited value in

Re: [Python-Dev] TextIO seek and tell cookies

2016-09-25 Thread Nick Coghlan
On 26 September 2016 at 10:21, MRAB wrote: > On 2016-09-26 00:21, Ben Leslie wrote: >> Are there any downsides to this? I've made some progress developing a >> patch to change this functionality. Is it worth polishing and >> submitting? >> > An alternative might be a

[Python-Dev] Possibly inconsistent behavior in re groupdict

2016-09-25 Thread Gordon R. Burgess
I've been lurking for a couple of months, working up the confidence to ask the list about this behavior - I've searched through the PEPs but couldn't find any specific reference to it. In a nutshell, in the Python 3.5 library re patterns and search buffers both need to be either unicode or byte

Re: [Python-Dev] TextIO seek and tell cookies

2016-09-25 Thread MRAB
On 2016-09-26 00:21, Ben Leslie wrote: Hi all, I recently shot myself in the foot by assuming that TextIO.tell returned integers rather than opaque cookies. Specifically I was adding an offset to the value returned by TextIO.tell. In retrospect this doesn't make sense/ Now, I don't want to

[Python-Dev] TextIO seek and tell cookies

2016-09-25 Thread Ben Leslie
Hi all, I recently shot myself in the foot by assuming that TextIO.tell returned integers rather than opaque cookies. Specifically I was adding an offset to the value returned by TextIO.tell. In retrospect this doesn't make sense/ Now, I don't want to drive change simply because I failed to read

Re: [Python-Dev] cpython (3.6): replace usage of Py_VA_COPY with the (C99) standard va_copy

2016-09-25 Thread Nick Coghlan
On 24 September 2016 at 18:07, Benjamin Peterson wrote: > > > On Fri, Sep 23, 2016, at 09:32, Steven D'Aprano wrote: >> On Thu, Sep 22, 2016 at 11:47:20PM -0700, Benjamin Peterson wrote: >> > >> > On Thu, Sep 22, 2016, at 04:44, Victor Stinner wrote: >> > > 2016-09-22 8:02