- def read_temperature(
- self, location: str, *, convert_to_fahrenheit=False
- ) -> Optional[float]:
+ def read_temperature(self, location: str, *, convert_to_fahrenheit=False) -> Optional[float]:
+ """Read the current value of a thermometer (in celsius unless
+ convert_to_fahrenheit is True) and return it. Return None on
+ error.
+
+ >>> registry = ThermometerRegistry()
+ >>> registry.read_temperature('unknown') is None
+ True
+
+ >>> temp = registry.read_temperature('house_computer_closet')
+ >>> temp is None
+ False
+ >>> temp > 0.0
+ True
+
+ """
+