From 547cf6320e27bbf62ba196f408832467ab8cf5e7 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Sun, 2 Mar 2025 11:22:48 -0500 Subject: [PATCH] Add __slots__ for performance --- lib/xmet/raob.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/xmet/raob.py b/lib/xmet/raob.py index 0348a7e..1959fd8 100644 --- a/lib/xmet/raob.py +++ b/lib/xmet/raob.py @@ -14,6 +14,11 @@ class RAOBReaderException(Exception): ... class RAOBSample(): + __slots__ = ( + 'surface', 'height', 'pressure', 'temp', 'dewpoint', + 'wind_dir', 'wind_speed' + ) + def __init__(self): self.surface: bool = False self.height: float = None