47 ms·
Good thing CPython is the spec for the language. That said, many of these "oddities" are disingenuous to the point of lying, many of the error messages are omi
by sitkack 9y ago
Good thing CPython is the spec for the language.
That said, many of these "oddities" are disingenuous to the point of lying, many of the error messages are omitted. Or the functionality converts to list before doing an operation. Not that it is good library or language design, but this is a great way to inflate bug counts.
- th 9y agoI think you may be taking the word oddity different than I meant it. These are things that trip up my students when they're learning Python. I left out error messages (and occasionally other things) because Twitter. I don't think any of the ones I put in this moment should be considered bugs. Many of these are core language features.
- sitkack 9y agoSome of them seem like litmus test for a Python programmer interview, others feel like WTFs Python LoL! It is hard to disambiguate them. Standing on their own in that twitter feed, with little context, there is next to no enlightenment. Lots of the oddities could be explained by In [1]: list({'a':1, 'b':2, 'c':3}) Out[1]: ['a', 'b', 'c'] When people would expect In [2]: list({'a':1, 'b':2, 'c':3}.items()) Out[2]: [('a', 1), ('b', 2), ('c', 3)] Lots of Python makes sense. About 3% does not. It is good to know the 3% so it doesn't bite one in the ass. Maybe switch to image posts? 1 megapixel limit.