mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Make Ellipsis and NotImplemented picklable through the reduce protocol.
This commit is contained in:
parent
4c05d3bc56
commit
c49477b184
4 changed files with 24 additions and 42 deletions
|
@ -633,14 +633,6 @@ class _Pickler:
|
|||
self.write(NONE)
|
||||
dispatch[type(None)] = save_none
|
||||
|
||||
def save_ellipsis(self, obj):
|
||||
self.save_global(Ellipsis, 'Ellipsis')
|
||||
dispatch[type(Ellipsis)] = save_ellipsis
|
||||
|
||||
def save_notimplemented(self, obj):
|
||||
self.save_global(NotImplemented, 'NotImplemented')
|
||||
dispatch[type(NotImplemented)] = save_notimplemented
|
||||
|
||||
def save_bool(self, obj):
|
||||
if self.proto >= 2:
|
||||
self.write(NEWTRUE if obj else NEWFALSE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue