This will generate a hard fault:
import analogio
analogio.AnalogIn.value
Similarly true for storage.VfsFat.label, touchio.TouchIn.value, etc.
The problem is that instead of returning a property object, the reference to the property actually calls the get function for the property, passing in self=0x0.
Some things don't crash because they actually ignore the self value, e.g. microcontroller.Processor.temperature, but that actually returns the temperature, which is wrong.
This problem has existed since the beginning: in 1.0.0, analogio.AnalogIn.value returns 0, not a property object.
This will generate a hard fault:
Similarly true for
storage.VfsFat.label,touchio.TouchIn.value, etc.The problem is that instead of returning a property object, the reference to the property actually calls the
getfunction for the property, passing inself=0x0.Some things don't crash because they actually ignore the
selfvalue, e.g.microcontroller.Processor.temperature, but that actually returns the temperature, which is wrong.This problem has existed since the beginning: in 1.0.0,
analogio.AnalogIn.valuereturns0, not a property object.