type PrivateTransient_mixin
source code
object --+
|
cscRoot --+
|
PrivateTransient_mixin
- Known Subclasses:
-
Emulate the transient keyword from Java for private member
variables.
This class defines a __getstate__ method which returns a
copy of self.__dict__ with certain members removed.
Specifically, if a string "s" appears in a class member
variable named __PrivateTransient defined in the
"Class" class, then the corresponding private variable
"_Class__s" will be removed from the state dictionary. This is
used to eliminate unnecessary fields from instances placed in namespace archives without having to implement a
__getstate__ method in every class in the instance
hierarchy.
For an example, see pyxb.xmlschema.structures._SchemaComponent_mixin
If you use this, it is your responsibility to define the
__PrivateTransient class variable and add to it the required
variable names.
Classes that inherit from this are free to define their own
__getstate__ method, which may or may not invoke the
superclass one. If you do this, be sure that the class defining
__getstate__ lists PrivateTransient_mixin as one of its direct
superclasses, lest the latter end up earlier in the mro and consequently
bypass the local override.
|
|
__Attribute = '__PrivateTransient'
|