I just noticed a subtle inconsistency in the error messages when trying to assign to a tuple: >>> (1,)[0] = "foo" Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: object doesn't support item assignment >>> (1,)['foo'] = "foo" Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: object does not support item assignment Note the "doesn't" vs "does not". It's easily tracked down to PyObject_SetItem() and PySequence_SetItem() (in Objects/abstract.c). Is this deliberate, or a simple oversight? I'm inclined to assume the latter, and change "doesn't" to "does not" on the grounds that error messages are formal writing, and I was taught not to use contractions in formal writing. Any objections? Greg -- Greg Ward <gward at python.net> http://www.gerg.ca/ Eschew obfuscation!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4