Adds methods to any sequence type so that it can be used with binding.
Generally this can be used with namedtuples to provide clean multi-value returns:
class MyType(namedtuple(...), PrettyTensorTupleMixin): pass
Subclasses with nested structure should note that this does not unpack nested structure by default. You must implement flatten and build_from_flattened.
[TOC]
Creates a function by binding the arguments in the given order.
- binding_order: The unbound variables. This must include all values.
A function that takes the arguments of binding_order.
- ValueError: If the bindings are missing values or include unknown values.
Makes the bindings to each item in this and returns a new tuple.
Given a flattened structure from flatten, make a new version of this.
Subclasses with nested structure should implement this method.
A list of data that should be bound and constructed, by default just self.
Returns whether there are any unbound vars in this tuple.
- unbound_vars