gtirb.node module¶
- class gtirb.node.Node(uuid=None)[source]¶
Bases:
object
A Node is any GTIRB object which can be referenced by UUID.
- Variables:
~.uuid – The UUID of this Node.
- __init__(uuid=None)[source]¶
- Parameters:
uuid (
typing.Optional
[uuid.UUID
]) – The UUID of thisNode
, or None if a new UUID needs generated viauuid.uuid4()
. Defaults to None.
- deep_eq(other)[source]¶
Check: is
self
structurally equal toother
?This method should be used only when deep structural equality checks are actually needed, and not for all equality checks. Typically the default implmentation of __eq__, which checks pointer equality, is sufficient; Nodes are cached such that references to two Nodes with the same UUID refer to the same exact object. Use this method when you have manually constructed Nodes that may share the same UUID despite being different objects, and you need to check for structural equality.
- Return type:
bool