A Thing object should have a ThingSettings object available at self.thing_settings to persist data. Currently, this is supplied when the Thing is added to the server, i.e. after __init__ has run. This has the potential to be quite confusing, I think.
The reason this is done is that we don't know where the settings file should be until there's a server involved - because the settings location is a property of the server. It might be possible to change this, for example by making sure that Things are always instantiated after the server - adding a mandatory server argument or perhaps using a context variable.
Resolution: Keep the current behaviour, but make it clear that settings will only have their values available after the Thing is connected to a ThingServer.
A
Thingobject should have aThingSettingsobject available atself.thing_settingsto persist data. Currently, this is supplied when theThingis added to the server, i.e. after__init__has run. This has the potential to be quite confusing, I think.The reason this is done is that we don't know where the settings file should be until there's a server involved - because the settings location is a property of the server. It might be possible to change this, for example by making sure that
Things are always instantiated after the server - adding a mandatoryserverargument or perhaps using a context variable.Resolution: Keep the current behaviour, but make it clear that settings will only have their values available after the
Thingis connected to aThingServer.