Kaydet (Commit) 02184282 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Clarify that the purpose of computing all the miscellaneous collection types is…

Clarify that the purpose of computing all the miscellaneous collection types is to register them with the appropriate ABCs.
üst dfe980bb
...@@ -18,9 +18,13 @@ __all__ = ["Hashable", "Iterable", "Iterator", ...@@ -18,9 +18,13 @@ __all__ = ["Hashable", "Iterable", "Iterator",
"ByteString", "ByteString",
] ]
# Private list of types that we want to register with the various ABCs
### collection related types which are not exposed through builtin ### # so that they will pass tests like:
## iterators ## # it = iter(somebytearray)
# assert isinstance(it, Iterable)
# Note: in other implementations, these types many not be distinct
# and they make have their own implementation specific types that
# are not included on this list.
bytes_iterator = type(iter(b'')) bytes_iterator = type(iter(b''))
bytearray_iterator = type(iter(bytearray())) bytearray_iterator = type(iter(bytearray()))
#callable_iterator = ??? #callable_iterator = ???
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment