pyTooling.CallByRef

Auxiliary classes to implement call-by-reference.

Hint

See high-level help for explanations and usage examples.

Classes


Classes

class pyTooling.CallByRef.CallByRefParam[source]

Implements a call-by-reference parameter.

See also

  • CallByRefBoolParam
    → A special call-by-reference implementation for boolean reference types.

  • CallByRefIntParam
    → A special call-by-reference implementation for integer reference types.

Inheritance

Inheritance diagram of CallByRefParam

__init__(value=None)[source]

Constructs a call-by-reference object for any type.

Parameters:

value (Optional[TypeVar(T)]) – The value to be set as an initial value.

Return type:

None

Value: TypeVar(T)

internal value

__ilshift__(other)[source]

Assigns a value to the call-by-reference object.

Parameters:

other (TypeVar(T)) – The value to be assigned to this call-by-reference object.

Return type:

CallByRefParam[TypeVar(T)]

Returns:

Itself.

__eq__(other)[source]

Compare a CallByRefParam wrapped value with another instances (CallbyRefParam) or non-wrapped value for equality.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if both values are equal.

__ne__(other)[source]

Compare a CallByRefParam wrapped value with another instances (CallbyRefParam) or non-wrapped value for inequality.

Parameters:

other – Parameter to compare against.

Return type:

bool

Returns:

True, if both values are unequal.

__repr__()[source]

Returns the wrapped object’s string representation.

Return type:

str

Returns:

The string representation of the wrapped value.

__str__()[source]

Returns the wrapped object’s string equivalent.

Return type:

str

Returns:

The string equivalent of the wrapped value.

class pyTooling.CallByRef.CallByRefBoolParam[source]

A special call-by-reference implementation for boolean reference types.

Inheritance

Inheritance diagram of CallByRefBoolParam

__eq__(other)[source]

Compare a CallByRefBoolParam wrapped boolean value with another instances (CallByRefBoolParam) or non-wrapped boolean value for equality.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if both values are equal.

Raises:

TypeError – If parameter other is not of type bool or CallByRefBoolParam.

__ne__(other)[source]

Compare a CallByRefBoolParam wrapped boolean value with another instances (CallByRefBoolParam) or non-wrapped boolean value for inequality.

Parameters:

other – Parameter to compare against.

Return type:

bool

Returns:

True, if both values are unequal.

Raises:

TypeError – If parameter other is not of type bool or CallByRefBoolParam.

__bool__()[source]

Type conversion to bool.

Return type:

bool

Returns:

The wrapped value.

__int__()[source]

Type conversion to int.

Return type:

int

Returns:

The integer representation of the wrapped boolean value.

Value: TypeVar(T)

internal value

__ilshift__(other)

Assigns a value to the call-by-reference object.

Parameters:

other (TypeVar(T)) – The value to be assigned to this call-by-reference object.

Return type:

CallByRefParam[TypeVar(T)]

Returns:

Itself.

__init__(value=None)

Constructs a call-by-reference object for any type.

Parameters:

value (Optional[TypeVar(T)]) – The value to be set as an initial value.

Return type:

None

__repr__()

Returns the wrapped object’s string representation.

Return type:

str

Returns:

The string representation of the wrapped value.

__str__()

Returns the wrapped object’s string equivalent.

Return type:

str

Returns:

The string equivalent of the wrapped value.

class pyTooling.CallByRef.CallByRefIntParam[source]

A special call-by-reference implementation for integer reference types.

Inheritance

Inheritance diagram of CallByRefIntParam

__neg__()[source]

Negate: -self.

Return type:

int

__pos__()[source]

Positive: +self.

Return type:

int

__invert__()[source]

Invert: ~self.

Return type:

int

__and__(other)[source]

And: self & other.

Return type:

int

Parameters:

other (Any)

__or__(other)[source]

Or: self | other.

Return type:

int

Parameters:

other (Any)

__xor__(other)[source]

Xor: self ^ other.

Return type:

int

Parameters:

other (Any)

__iand__(other)[source]

Inplace and: self &= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__ior__(other)[source]

Inplace or: self |= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__ixor__(other)[source]

Inplace or: self |= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__add__(other)[source]

Addition: self + other.

Return type:

int

Parameters:

other (Any)

__sub__(other)[source]

Subtraction: self - other.

Return type:

int

Parameters:

other (Any)

__truediv__(other)[source]

Division: self / other.

Return type:

int

Parameters:

other (Any)

__floordiv__(other)[source]

Floor division: self // other.

Return type:

int

Parameters:

other (Any)

__mul__(other)[source]

Multiplication: self * other.

Return type:

int

Parameters:

other (Any)

__mod__(other)[source]

Modulo: self % other.

Return type:

int

Parameters:

other (Any)

__pow__(other)[source]

Power: self ** other.

Return type:

int

Parameters:

other (Any)

__iadd__(other)[source]

Addition: self += other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__isub__(other)[source]

Subtraction: self -= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__idiv__(other)[source]

Division: self /= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__ifloordiv__(other)[source]

Floor division: self // other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__imul__(other)[source]

Multiplication: self *= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__imod__(other)[source]

Modulo: self %= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__ipow__(other)[source]

Power: self **= other.

Return type:

CallByRefIntParam

Parameters:

other (Any)

__eq__(other)[source]

Compare a CallByRefIntParam wrapped integer value with another instances (CallByRefIntParam) or non-wrapped integer value for equality.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if both values are equal.

Raises:

TypeError – If parameter other is not of type int, float, complex, Decimal or CallByRefParam.

__ne__(other)[source]

Compare a CallByRefIntParam wrapped integer value with another instances (CallByRefIntParam) or non-wrapped integer value for inequality.

Parameters:

other – Parameter to compare against.

Return type:

bool

Returns:

True, if both values are unequal.

Raises:

TypeError – If parameter other is not of type int, float, complex, Decimal or CallByRefParam.

__lt__(other)[source]

Compare a CallByRefIntParam wrapped integer value with another instances (CallByRefIntParam) or non-wrapped integer value for less-than.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if the wrapped value is less than the other value.

Raises:

TypeError – If parameter other is not of type int, float, complex, Decimal or CallByRefParam.

__le__(other)[source]

Compare a CallByRefIntParam wrapped integer value with another instances (CallByRefIntParam) or non-wrapped integer value for less-than-or-equal.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if the wrapped value is less than or equal the other value.

Raises:

TypeError – If parameter other is not of type int, float, complex, Decimal or CallByRefParam.

__gt__(other)[source]

Compare a CallByRefIntParam wrapped integer value with another instances (CallByRefIntParam) or non-wrapped integer value for geater-than.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if the wrapped value is greater than the other value.

Raises:

TypeError – If parameter other is not of type int, float, complex, Decimal or CallByRefParam.

__ge__(other)[source]

Compare a CallByRefIntParam wrapped integer value with another instances (CallByRefIntParam) or non-wrapped integer value for greater-than-or-equal.

Parameters:

other (Any) – Parameter to compare against.

Return type:

bool

Returns:

True, if the wrapped value is greater than or equal the other value.

Raises:

TypeError – If parameter other is not of type int, float, complex, Decimal or CallByRefParam.

__bool__()[source]

Type conversion to bool.

Return type:

bool

Returns:

The boolean representation of the wrapped integer value.

__int__()[source]

Type conversion to int.

Return type:

int

Returns:

The wrapped value.

Value: TypeVar(T)

internal value

__float__()[source]

Type conversion to float.

Returns:

The float representation of the wrapped integer value.

__ilshift__(other)

Assigns a value to the call-by-reference object.

Parameters:

other (TypeVar(T)) – The value to be assigned to this call-by-reference object.

Return type:

CallByRefParam[TypeVar(T)]

Returns:

Itself.

__init__(value=None)

Constructs a call-by-reference object for any type.

Parameters:

value (Optional[TypeVar(T)]) – The value to be set as an initial value.

Return type:

None

__repr__()

Returns the wrapped object’s string representation.

Return type:

str

Returns:

The string representation of the wrapped value.

__str__()

Returns the wrapped object’s string equivalent.

Return type:

str

Returns:

The string equivalent of the wrapped value.