]> granicus.if.org Git - python/commitdiff
Removed memoryview objects from bytes_types.
authorAlexandre Vassalotti <alexandre@peadrop.com>
Sat, 3 May 2008 01:42:49 +0000 (01:42 +0000)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Sat, 3 May 2008 01:42:49 +0000 (01:42 +0000)
memoryview objects have a different API (such as for indexing) than
bytes and bytesarray objects, so memoryview objects shouldn't be
treated blindly as "bytes" objects.

Lib/pickle.py

index ea8d8b545f12227e8de4fcf225d68f271daef4f9..a9d4355b0b46bcfada624708640cd501f236f3da 100644 (file)
@@ -39,7 +39,7 @@ __all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
            "Unpickler", "dump", "dumps", "load", "loads"]
 
 # Shortcut for use in isinstance testing
-bytes_types = (bytes, bytearray, memoryview)
+bytes_types = (bytes, bytearray)
 
 # These are purely informational; no code uses these.
 format_version = "3.0"                  # File format version we write