From 8cb02b6000c66478406c12270a9f86e39fd20305 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Sat, 3 May 2008 01:42:49 +0000 Subject: [PATCH] Removed memoryview objects from bytes_types. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pickle.py b/Lib/pickle.py index ea8d8b545f1..a9d4355b0b4 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -39,7 +39,7 @@ "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