ExtensionValue#

class hugr.ext.ExtensionValue(name: str, val: Value)[source]#

Bases: ExtensionObject

A value defined in an Extension.

Methods

get_extension

Retrieve the extension associated with the object.

Attributes

name

The name of the value.

val

Value payload.

get_extension() Extension#

Retrieve the extension associated with the object.

Returns:

The extension associated with the object.

Raises:

NoParentExtension – If the object is not associated with an extension.

name: str#

The name of the value.

val: Value#

Value payload.