r/Python • • Jun 06 '21

News PEP 661 -- Sentinel Values

https://www.python.org/dev/peps/pep-0661/
220 Upvotes

109 comments sorted by

View all comments

Show parent comment

-5

u/ArtOfWarfare Jun 06 '21

Obviously I’ve heard of node.js - they had to butcher the language about as badly as Unity did to make it fit their use case. I refuse to call Unity’s language javascript, and I wouldn’t call what node.js runs javascript, either.

Python has a definitive implementation - CPython. There’s no disagreement on that. Everything else is an emulation, with some better than others (there is probably a lot of disagreement on what to call these other Python interpreters - “emulation” is probably not the best word but the first that came to my mind.)

6

u/tunisia3507 Jun 06 '21

They are all python implementations. CPython is not a definitive implementation; it is a reference implementation. There is a specification, separate to the CPython implementation, although they are developed in tandem. That's why you get situations like dict ordering, where before 3.6 they had arbitrary order; in CPython 3.6 but not Python 3.6 they were insertion-ordered, and in Python 3.7 onward they are insertion-ordered.

Some implementations do or don't comply with the whole spec.

-5

u/ArtOfWarfare Jun 06 '21

So in your example, CPython had the latest behavior first, and it only became part of the spec afterwards.