gvwilson@nevex.com wrote: > > [After discussion with Ping, and weekend thought] [good stuff] Allow me to offer yet another perspective on this. I'll keep it short. Python has sequences (indexable collections) and maps (associative collections). C++'s STL has vectors, sets, multi-sets, maps, and multi-maps. I find the distinction between these puzzling, and hereby offer another, somewhat relational-database minded, categorization as food for thought: - collections consist of objects, each of them with attributes - the first N attributes form the "key", the rest is the "residue" - there is also an implicit position attribute, which I'll call "#" - so an object consists of attributes: (K1,K2,...KN,#,R1,R2,...,RM) - one more bit of specification is needed: whether # is part of the key Let me mark the position between key attributes and residue with ":", so everything before the colon marks the uniquely identifying attributes. A vector (sequence) is: #:R1,R2,...,RM A set is: K1,K2,...KN: A multi-set is: K1,K2,...KN,#: A map is: K1,K2,...KN:#,R1,R2,...,RM A multi-map is: K1,K2,...KN,#:R1,R2,...,RM And a somewhat esoteric member of this classification: A singleton is: :R1,R2,...,RM I have no idea what this means for Python, but merely wanted to show how a relational, eh, "view" on all this might perhaps simplify the issues. -jcw
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