[Python-Dev] Bytcode "magic tag"

2015-10-28 Thread Eric V. Smith
In issue 25483 I'm adding an opcode to make f-string formatting more robust and faster. As part of that, I'm bumping the .pyc magic number. While doing that, I notice Lib/importlib/_bootstrap_external.h includes this comment: # Starting with the adoption of PEP 3147 in Python 3.2, every bump in

Re: [Python-Dev] Bytcode "magic tag"

2015-10-28 Thread Eric V. Smith
On 10/28/2015 10:22 AM, Eric Snow wrote: > On Wed, Oct 28, 2015 at 6:35 AM, Eric V. Smith wrote: >> Do I need to do anything else? Unlike what the comment in >> _boostrap_external.py suggests, this "magic tag" will not change every >> time a bytecode is added, but only on

Re: [Python-Dev] Bytcode "magic tag"

2015-10-28 Thread Eric Snow
On Wed, Oct 28, 2015 at 6:35 AM, Eric V. Smith wrote: > In issue 25483 I'm adding an opcode to make f-string formatting more > robust and faster. As part of that, I'm bumping the .pyc magic number. > > While doing that, I notice Lib/importlib/_bootstrap_external.h includes >

Re: [Python-Dev] Bytcode "magic tag"

2015-10-28 Thread Barry Warsaw
On Oct 28, 2015, at 08:35 AM, Eric V. Smith wrote: >The "following table" is a comment, that contains a few references to >the tag "cpython-", specifically cpython-32. It doesn't seem >that the tag is routinely updated in the comment. IIRC, it used to have to be changed in the code, but with

Re: [Python-Dev] Bytcode "magic tag"

2015-10-28 Thread Eric V. Smith
On 10/28/2015 10:19 AM, Barry Warsaw wrote: > On Oct 28, 2015, at 08:35 AM, Eric V. Smith wrote: > >> The "following table" is a comment, that contains a few references to >> the tag "cpython-", specifically cpython-32. It doesn't seem >> that the tag is routinely updated in the comment. > >

Re: [Python-Dev] Bytcode "magic tag"

2015-10-28 Thread Eric Snow
On Wed, Oct 28, 2015 at 8:28 AM, Eric V. Smith wrote: > Thanks. That part I've done (but forgot to mention). I was just > concerned about the "magic tag" part, which Barry cleared up. Ah, I misread. :) Yeah, that comment is out of date. -eric

[Python-Dev] Intended Usage of collections.abc for Custom Collections

2015-10-28 Thread jab
Dear Python-Dev, I am the author of bidict, a bidirectional map implementation for Python. A user recently filed a bug that bidict should be a subclass of dict, so that isinstance(mybidict, dict) would return True. I replied that the user should instead use isinstance(mybidict,

Re: [Python-Dev] Intended Usage of collections.abc for Custom Collections

2015-10-28 Thread jab
On Wed, Oct 28, 2015 at 1:16 PM, Brett Cannon wrote: > On Wed, 28 Oct 2015 at 08:47 wrote: > >> Dear Python-Dev, >> >> I am the author of bidict, a bidirectional map implementation for Python. >> A user recently filed a bug that bidict should be a subclass

Re: [Python-Dev] Intended Usage of collections.abc for Custom Collections

2015-10-28 Thread Brett Cannon
On Wed, 28 Oct 2015 at 08:47 wrote: > Dear Python-Dev, > > I am the author of bidict, a bidirectional map implementation for Python. > A user recently filed a bug that bidict should be a subclass of dict, so > that isinstance(mybidict, dict) would return True. I replied that

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-28 Thread Alexander Walters
Have you ever used a command line application that --accepted --Boolean --flags? Have you ever found one that required the flags to be in order? You remember how much you hated that application for being so arbitrary about the input? That is exactly how I feel about the order mattering for