mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
6874141b62
commit
1f2242650f
@ -11,3 +11,15 @@ Return the pickled representation of an object as a bytes object.
|
||||
|
||||
Return the unpickled object from a bytes object.
|
||||
|
||||
|
||||
## What can be pickled and unpickled?
|
||||
|
||||
The following types can be pickled:
|
||||
|
||||
- [x] None, True, and False;
|
||||
- [x] integers, floating-point numbers;
|
||||
- [x] strings, bytes;
|
||||
- [x] tuples, lists, sets, and dictionaries containing only picklable objects;
|
||||
- [ ] functions (built-in and user-defined) accessible from the top level of a module (using def, not lambda);
|
||||
- [ ] classes accessible from the top level of a module;
|
||||
- [x] instances of such classes
|
||||
|
Loading…
x
Reference in New Issue
Block a user