PyBool class

Inheritance
Available extensions

Constructors

PyBool(bool value)

Properties

hashCode → int
The hash code for this object.
no setterinherited
ptr → Pointer<PyObject>
no setterinherited
ref → PyRef
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

asBool() → bool

Available on PyObject, provided by the PyObjectConverter extension

asDouble() → double

Available on PyObject, provided by the PyObjectConverter extension

asInt() → int

Available on PyObject, provided by the PyObjectConverter extension

asString() → String

Available on PyObject, provided by the PyObjectConverter extension

call(PyTuple args, [PyDict? kwargs]) → PyObject

Available on PyObject, provided by the PyObjectCall extension

call0() → PyObject

Available on PyObject, provided by the PyObjectCall extension

callN(List<PyObject> args) → PyObject

Available on PyObject, provided by the PyObjectCall extension

ref-- args 里面的引用会释放一次
compare(PyObject other, PyComparison comparison) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: bool(a < b), bool(a <= b), bool(a == b), bool(a != b), bool(a > b), bool(a >= b) (by comparison)
deleteItem(PyObject key) → void

Available on PyObject, provided by the PyObjectAttributes extension

dispose() → void
inherited
equals(PyObject other) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: a == b
forward(List<Object?> args, {Map<String, Object?>? kwargs, PyConverter? converter}) → PyObject

Available on PyObject, provided by the PyObjectForward extension

Calls this Python callable with Dart positional and keyword arguments.
getAttr(String attribute) → PyObject

Available on PyObject, provided by the PyObjectAttributes extension

Get the attribute of a Python object.
getAttrBool(String attribute) → bool

Available on PyObject, provided by the PyObjectAttributes extension

getAttrDouble(String attribute) → double

Available on PyObject, provided by the PyObjectAttributes extension

getAttrInt(String attribute) → int

Available on PyObject, provided by the PyObjectAttributes extension

getAttrObject(PyObject attribute) → PyObject

Available on PyObject, provided by the PyObjectAttributes extension

getAttrString(String attribute) → String

Available on PyObject, provided by the PyObjectAttributes extension

getItem(PyObject key) → PyObject

Available on PyObject, provided by the PyObjectAttributes extension

Get the item of a Python object using the subscript operator.
hasAttr(String attribute) → bool

Available on PyObject, provided by the PyObjectAttributes extension

hasAttrObject(PyObject attribute) → bool

Available on PyObject, provided by the PyObjectAttributes extension

inPlaceAdd(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a += b
inPlaceAnd(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a &= b
inPlaceFloorDivide(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a //= b
inPlaceLshift(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a <<= b
inPlaceMatrixMultiply(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a @= b
inPlaceMultiply(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a *= b
inPlaceOr(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a |= b
inPlacePower(PyObject exponent, [PyObject? modulus]) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a **= b; with modulus: a = pow(a, b, modulus) Python power, optionally with a modulus. An omitted modulus uses None.
inPlaceRemainder(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a %= b
inPlaceRshift(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a >>= b
inPlaceSubtract(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a -= b
inPlaceTrueDivide(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a /= b
inPlaceXor(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a ^= b
matrixMultiply(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a @ b
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(PyObject other) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: a != b
positive() → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: +a
richCompare(PyObject other, PyComparison comparison) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a < b, a <= b, a == b, a != b, a > b, a >= b (by comparison) Preserves custom comparison results, such as array masks.
setAttr(String attribute, PyObject value) → void

Available on PyObject, provided by the PyObjectAttributes extension

Set the attribute of a Python object to a new value.
setAttrObject(PyObject attribute, PyObject value) → void

Available on PyObject, provided by the PyObjectAttributes extension

setItem(PyObject key, PyObject value) → void

Available on PyObject, provided by the PyObjectAttributes extension

toString() → String
A string representation of this object.
inherited
withContext<T>(T action(PyObject)) → T

Available on PyObject, provided by the PyObjectWithContext extension

Operators

operator %(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a % b
operator &(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a & b
operator *(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a * b
operator +(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a + b
operator -(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a - b
operator /(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a / b
operator <(PyObject other) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: a < b
operator <<(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a << b
operator <=(PyObject other) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: a <= b
operator ==(Object other) → bool
The equality operator.
inherited
operator >(PyObject other) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: a > b
operator >=(PyObject other) → bool

Available on PyObject, provided by the PyObjectOperator extension

python: a >= b
operator >>(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a >> b
operator ^(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a ^ b
operator unary-() → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: -a
operator |(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a | b
operator ~() → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: ~a
operator ~/(PyObject other) → PyObject

Available on PyObject, provided by the PyObjectOperator extension

python: a // b