Raymond> [Skip] >> If lists are conceptually like vectors or arrays in other languages >> and tuples are like C structs or Pascal records, then by converting >> from list to tuple form you've somehow muddied the data structure >> water just to take advantage of tuples' immutability. Raymond> In the context of literals used with the "in" operator, Raymond> practices are widely divergent within the standard library and Raymond> within the tutorial. Then perhaps we should strive to make the standard library and tutorial more consistent. Answers to questions on c.l.py often advocate the standard library as a good source for example code. Raymond> It seems that the list-as-arrays-tuple-as-records guideline is Raymond> not meaningful or applicable in the context of the "in" Raymond> operator. Proscribing tuple.__contains__ and tuple.__iter__ Raymond> carrys the notion a bit too far. I agree that the presence of __contains__ and __iter__ kind of blurs the distinction between the concept of sequence and struct. Skip
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