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

2016-09-28 Thread Gordon R. Burgess
urgess Cc: Python-Dev Subject: Re: [Python-Dev] Possibly inconsistent behavior in re groupdict Date: Sun, 25 Sep 2016 21:36:20 -0700 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

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 functi

[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 st