bpo-33138: Change standard error message for non-pickleable and non-copyable types. (GH-6239)

This commit is contained in:
Serhiy Storchaka 2018-10-31 02:28:07 +02:00 committed by GitHub
parent 3f819ca138
commit 0353b4eaaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 17 additions and 91 deletions

View file

@ -189,7 +189,7 @@ class socket(_socket.socket):
return s
def __getstate__(self):
raise TypeError("Cannot serialize socket object")
raise TypeError(f"cannot pickle {self.__class__.__name__!r} object")
def dup(self):
"""dup() -> socket object