as well as module-level classes and functions can be serialised in this way. Custom classes
may also be serialised if the class is imported into the current name-space of a program. It
should be noted that in Python 2 there is also a cPickle module, which is a faster C-
language implementation of pickle, and normally cPickle is the one to use unless you are
defining pickle subclasses. In Python 3 there is no cPickle module, and pickle
automatically uses the C-language implementation when it is available.
Do'stlaringiz bilan baham: