diff --git a/pep-0574.rst b/pep-0574.rst index b943f196549..05e2ed04cc3 100644 --- a/pep-0574.rst +++ b/pep-0574.rst @@ -164,8 +164,8 @@ to be returned from ``__reduce__`` implementations:: class bytearray: def __reduce_ex__(self, protocol): - if protocol == 5: - return type(self), PickleBuffer(self), None + if protocol >= 5: + return type(self), (PickleBuffer(self),), None # Legacy code for earlier protocols omitted ``PickleBuffer`` is a simple wrapper that doesn't have all the memoryview