New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__reduce_ex__ on lock object #63232
Comments
>>> import threading
>>> l = threading.Lock()
>>> l.__reduce_ex__(3)
(<function __newobj__ at 0x00000000026CD8C8>,
(<class '_thread.lock'>,),
None,
None,
None) Isn't it a bug that |
I don't really know. It simply looks like the default implementation of __reduce_ex__. Is it important? |
I use that to test whether an object is pickleable or not. It used to work in Python 2. |
Well, the obvious way to do it would be to call pickle.dumps() on |
Wrong, because the object itself could be pickleable but refer to a different object which is non-pickleable. I want to know whether the object itself, without any object it refers to, is pickleable. Also, pickling an object could be very resource-intensive, depending on its size. |
I think you're being too picky. Unless you're manually added stuff
Well, this is a Lock here, not an ISO file. |
This does not look like a bug to me. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: