cloudpipe / cloudpipe/cloudpickle
Should cloudpickle.dumps fail when closing over something undefined?
Open
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 1
Description
```python
def f():
undefined_function() # this is not defined
import cloudpickle
cloudpickle.dumps(f) # maybe this should throw an exception.
```
The last line succeeds, but I wonder if it would be preferable to raise an exception instead (instead of waiting for it to fail in the corresponding call to `cloudpickle.loads`). Alternatively, is there a way for the caller to configure cloudpickle to raise an exception in the above situation? Or perhaps to detect such a situation?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.