[Python-Dev] Guarantee ordered dict literals in v3.7?

Barry Warsaw barry at python.org
Tue Nov 7 20:50:58 EST 2017


On Nov 7, 2017, at 16:15, Chris Barker - NOAA Federal <chris.barker at noaa.gov> wrote:

> Actually, there is a LOT of code out there that expects reference counting. I know a lot of my code does. So if cPython does abandon it some day, there will be issues.

I see this all the time in code reviews:

content = open(some file).read()

I never let that go uncommented.

So while you’re right that CPython is the reference implementation, and few people read the language spec, it’s still encombunt on us to point out broken code, code with implicit assumptions, and code that is not portable between implementations.  Having the reference manual to point to chapter and verse is critical to avoid Python just devolving into an ad-hoc language ruled by its most popular implementation.  This is something I believe Guido realized early on when JPython was first invented, and it was an important distinction that Python held, e.g. versus Perl.  I still believe it’s an important principle to maintain.

Cheers,
-Barry


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171107/b22941d8/attachment.sig>


More information about the Python-Dev mailing list