pg.MaybePartial¶
Accessible via pg.MaybePartial
, pg.object_utils.MaybePartial
.
- class MaybePartial[source]¶
Bases:
object
Interface for classes whose instances can be partially constructed.
A
MaybePartial
object is an object whose__init__
method can acceptpg.MISSING_VALUE
as 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.