![]() |
Phasor 3.1.1
Stack VM based Programming Language
|
Public Member Functions | |
| "Value" | null (cls) |
| "Value" | from_bool (cls, bool v) |
| "Value" | from_int (cls, int v) |
| "Value" | from_float (cls, float v) |
| "Value" | from_string (cls, str v) |
| bool | as_bool (self) |
| int | as_int (self) |
| float | as_float (self) |
| str | as_string (self) |
| str | __repr__ (self) |
| bool | __eq__ (self, object other) |
Public Attributes | |
| _Payload | type = ValueType.Null: |
Static Protected Attributes | |
| _Payload | _data = None |
A typed constant-pool entry.
Use the class-method constructors rather than setting ``type`` /
``_data`` directly::
Value.null()
Value.from_bool(True)
Value.from_int(42)
Value.from_float(3.14)
Value.from_string("hello")
| bool phasor.Value.Value.__eq__ | ( | self, | |
| object | other ) |
| str phasor.Value.Value.__repr__ | ( | self | ) |
| bool phasor.Value.Value.as_bool | ( | self | ) |
| float phasor.Value.Value.as_float | ( | self | ) |
| int phasor.Value.Value.as_int | ( | self | ) |
| str phasor.Value.Value.as_string | ( | self | ) |
| "Value" phasor.Value.Value.from_bool | ( | cls, | |
| bool | v ) |
| "Value" phasor.Value.Value.from_float | ( | cls, | |
| float | v ) |
| "Value" phasor.Value.Value.from_int | ( | cls, | |
| int | v ) |
| "Value" phasor.Value.Value.from_string | ( | cls, | |
| str | v ) |
| "Value" phasor.Value.Value.null | ( | cls | ) |