You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Till 2.2.0, non-DATA events had a value setter. In 2.2.0, I removed event value lazy evaluation entirely.
Now value is an attribute of EventBase. Structs as part of list events or child level structs didn't invoke any setters, as they were just dictionaries.
The earlier property setter failed with a ConstructError or struct.Error which was non descriptive of what really caused it.
Ideas
Make EventBase.value a descriptor again. Instead of doing everything in EventBasector, shift the parsing logic to subclasses.
Make this descriptor take in a validator class. For struct-based events, wrap the parsed Container into a special dictionary descriptor which validates every __setitem__ with the correct construct.
List event values could have their own list descriptor wrapper over the struct dictionary descriptors.
The text was updated successfully, but these errors were encountered:
Problem
Till 2.2.0, non-
DATA
events had a value setter. In 2.2.0, I removed event value lazy evaluation entirely.Now
value
is an attribute ofEventBase
. Structs as part of list events or child level structs didn't invoke any setters, as they were just dictionaries.The earlier property setter failed with a
ConstructError
orstruct.Error
which was non descriptive of what really caused it.Ideas
Make
EventBase.value
a descriptor again. Instead of doing everything inEventBase
ctor, shift the parsing logic to subclasses.Make this descriptor take in a validator class. For struct-based events, wrap the parsed Container into a special dictionary descriptor which validates every __setitem__ with the correct construct.
List event values could have their own list descriptor wrapper over the struct dictionary descriptors.
The text was updated successfully, but these errors were encountered: