Movatterモバイル変換
[0]ホーム
[Python-Dev] Add a frozendict builtin type
Victor Stinnervictor.stinner at gmail.com
Mon Feb 27 22:28:22 CET 2012
> This may be an issue at the C level (I'm not sure), but since this would> be a Python 3-only collection, "user" code (in Python) should/would> generally be using abstract base classes, so type-checking would not> be an issue (as in Python code performing `isinstance(a, dict)` checks> naturally failing on `frozendict`)>> Plus `frozenset` does not inherit from `set`, it's a whitelist> reimplementation and I've never known anybody to care. So there's> that precedent. And of course there's no inheritance relationship> between lists and tuples.At a second thought, I realized that it does not really matter.frozendict and dict can be "unrelated" (no inherance relation).Victor
More information about the Python-Devmailing list
[8]ページ先頭