Alexander Belopolsky <alexander.belopolsky <at> gmail.com> writes: > > AB> I disagree with Martin. I think interning is a set > AB> operation and it is unfortunate that set API does not > AB> support it directly. > > ML> I disagree with Alexander's last remark in several respects: [...] > ML> The operation "give me the member equal but not identical > ML> to E" is conceptually a lookup operation; the mathematical set > ML> construct has no such operation, and the Python set models > ML> it closely. IOW, set is *not* a dict with key==value. This looks like a debate of purity vs. practicality. I don't have any opinion on a Python-facing API, but the interpreter's dict of interned strings could probably converted to a set as a simple optimization. Regards Antoine.
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