Tri.struct

Latest version: v4.0.0

Safety actively analyzes 629532 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

2.4.0

~~~~~~~~~~~~~~~~~~

* Improvement: If a Struct subclass implements the `__missing__` method,
it will not be called before GetAttr on attribute access, but will be
called before GetAttr on dict access.

2.3.1

~~~~~~~~~~~~~~~~~~

* Bugfix: Clear KeyError in CStruct getattr before trying GetAttr,
otherwise the KeyError may "leak out". Also, only clear the error
and attempt GetAttr if the original error was a KeyError.

2.3.0

~~~~~~~~~~~~~~~~~~

* Add mixin class `Frozen` to make read-only versions of a dict-derived
class (typically a Struct or a subclass there of.)

* Use the `Frozen` mixin to implement `FrozenStruct`

2.2.0

~~~~~~~~~~~~~~~~~~

* Add keyword arguments to `merged` function.

2.1.2

~~~~~~~~~~~~~~~~~~

* Redo the C implementation to be a "heaptype", and remove the hack of
setting `__dict__` = `self`. Instead, `object` will control the type
storage, letting us "insert" attributes into the object without
polluting the `dict`.

2.0

~~~~~~~~~~~~~~~~

* slim down interface to again match dict
* add tri.struct.merged function to join structs
* add optional C implementation to speed up instantiation

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.