mirror of
				https://github.com/pocketpy/pocketpy
				synced 2025-10-30 08:20:16 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			825 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			825 B
		
	
	
	
	
	
	
	
| icon | label | 
|---|---|
| package | pickle | 
pickle.dumps(obj) -> bytes
Return the pickled representation of an object as a bytes object.
pickle.loads(b: bytes)
Return the unpickled object from a bytes object.
What can be pickled and unpickled?
The following types can be pickled:
- None, True, and False;
- integers, floating-point numbers;
- strings, bytes;
- 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;
- instances of such classes
- PY_STRUCT_LIKEobjects
The following magic methods are available:
- __getnewargs__
- __getstate__
- __setstate__
- __reduce__