pg.MaybePartial¶
Accessible via pg.MaybePartial, pg.utils.MaybePartial.
- class MaybePartial[source]¶
Bases:
objectInterface for classes whose instances can be partially constructed.
A
MaybePartialobject is an object whose__init__method can acceptpg.MISSING_VALUEas its argument values. All symbolic types (seepg.Symbolic) implements this interface, as their symbolic attributes can be partially filled.Example:
d = pg.Dict(x=pg.MISSING_VALUE, y=1) assert d.is_partial assert 'x' in d.missing_values()
Attributes:
Returns True if this object is partial.
Methods:
missing_values([flatten])Returns missing values from this object.