]> granicus.if.org Git - python/commitdiff
Clarify that the purpose of computing all the miscellaneous collection types is to...
authorRaymond Hettinger <python@rcn.com>
Thu, 5 Apr 2012 20:31:12 +0000 (13:31 -0700)
committerRaymond Hettinger <python@rcn.com>
Thu, 5 Apr 2012 20:31:12 +0000 (13:31 -0700)
Lib/collections/abc.py

index 7fbe84dfe97c092075ece7c29d777ed73edb2a0d..37a813abdae26fa63a74b66e95f88dd52d2a4dc1 100644 (file)
@@ -18,9 +18,13 @@ __all__ = ["Hashable", "Iterable", "Iterator",
            "ByteString",
            ]
 
-
-### collection related types which are not exposed through builtin ###
-## iterators ##
+# Private list of types that we want to register with the various ABCs
+# so that they will pass tests like:
+#       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''))
 bytearray_iterator = type(iter(bytearray()))
 #callable_iterator = ???