With these changes, device is no longer an argument of Adpater.__init__. This makes it possible to construct an adapter without the need of having a device object available at exactly that point. As a side-effect, it is now also much easier to "re-bind" another device, e.g. to swap out the device at runtime completely seamlessly (from the adapter's point of view). This will make it much easier to implemented #98.
Also, device is now a "proper" member of Adapter, making it less awkward to access the device when writing an interface. The internal _device still works, but maybe we should add a recommendation to the release notes that device is now available and should be used instead.
This fixes #207.
With these changes,
device
is no longer an argument ofAdpater.__init__
. This makes it possible to construct an adapter without the need of having a device object available at exactly that point. As a side-effect, it is now also much easier to "re-bind" another device, e.g. to swap out the device at runtime completely seamlessly (from the adapter's point of view). This will make it much easier to implemented #98.Also,
device
is now a "proper" member ofAdapter
, making it less awkward to access the device when writing an interface. The internal_device
still works, but maybe we should add a recommendation to the release notes thatdevice
is now available and should be used instead.The user facing documentation has been updated.