NAME ^

classes/pyobject.pmc - Python Object

DESCRIPTION ^

Abstract base class for Python objects.

Methods ^

void destroy()

Destroys the object.

PMC* "__abs__"(PMC *self)

Returns the absolute value of self.

PMC* "__add__"(PMC *self, PMC *value)

Adds *value to self and returns the result.

PMC* "__and__"(PMC *self, PMC *value)

Returns the result of the logical AND of self and *value.

PMC* "__cmp__"(PMC *self, PMC *value)

Returns the result of comparing self with *value.

PMC* "__div__"(PMC *self, PMC *value)

Divides self by *value and returns the result.

PMC* "__divmod__"(PMC *self, PMC *value)

Divides self by *value and returns the remainder.

PMC* "__float__"(PMC *self)

Returns the float value of self.

PMC* "__floordiv__"(PMC *self, PMC *value)

Floor divides self by *value and returns the result.

PMC* "__hash__"(PMC *self)

Returns the hash value of self.

PMC* "__int__"(PMC *self)

Returns the integer value of self.

void "__invert__"(PMC *self, PMC *value)

Calculates the bitwise negation and return the result.

PMC* "__lshift__"(PMC *self, PMC *value)

Bitwise shift left (<<<<>>) of the integer by *value and returns the result.

PMC* "__mod__"(PMC *self, PMC *value)

Return the modulus of self with *value.

PMC* "__mul__"(PMC *self, PMC *value)

Return the value of self multiplied by *value.

void "__neg__"(PMC *self, PMC *value)

Calculates the negation and return the result.

void "__nonzero__"(PMC *self, PMC *value)

Determine if a given value is "True" or "False"

PMC* "__or__"(PMC *self, PMC *value)

Returns the result of the logical OR of self and *value.

PMC* "__pow__"(PMC *self, PMC *value)

Raise the number to the specified power and return the result.

PMC* "__radd__"(PMC *self, PMC *value)

Adds *value to self and returns the result.

PMC* "__rand__"(PMC *self, PMC *value)

Returns the result of the logical AND of *value and self.

PMC* "__rdiv__"(PMC *self, PMC *value)

Divides *value by self and returns the result.

PMC* "__repr__"(PMC *self, PMC *value)

Return the string representation of this PMC.

PMC* "__rfloordiv__"(PMC *self, PMC *value)

Floor divides *value by self and returns the result.

PMC* "__rlshift__"(PMC *self, PMC *value)

Bitwise shift left (<<<<>>) of *value by the integer and returns the result.

PMC* "__rmod__"(PMC *self, PMC *value)

Return the modulus of *value with self.

PMC* "__rmul__"(PMC *self, PMC *value)

Return the value of *value multiplied by self.

PMC* "__ror__"(PMC *self, PMC *value)

Returns the result of the logical OR of *value and self.

PMC* "__rpow__"(PMC *self, PMC *value)

Raise the number to the specified power and return the result.

PMC* "__rrshift__"(PMC *self, PMC *value)

Bitwise shift right (<<>>>>) of *value by the integer and returns the result.

PMC* "__rshift__"(PMC *self, PMC *value)

Bitwise shift right (<<>>>>) of the integer by *value and returns the result.

PMC* "__rsub__"(PMC *self, PMC *value)

Subtracts self from *value and returns the result.

PMC* "__rxor__"(PMC *self, PMC *value)

Returns the result of the bitwise XOR of *value and self.

void "__str__"(PMC *self, PMC *value)

Return the string representation of this PMC.

PMC* "__sub__"(PMC *self, PMC *value)

Subtracts *value from self and returns the result.

PMC* "__xor__"(PMC *self, PMC *value)

Returns the result of the bitwise XOR of self and *value.

PMC *find_method(STRING *method_name)

Looks up the method for *method_name and returns it.

STRING *get_repr()

Returns the string representation of the integer.

void logical_and(PMC *value, PMC *dest)

Returns in *dest the result of the logical AND of the scalar and *value.

void logical_not(PMC *dest)

Returns in *dest the result of the logical not of the scalar.

void logical_or(PMC *value, PMC *dest)

Returns in *dest the result of the logical OR of the scalar and *value.

void morph(INTVAL type)

Morphs the scalar to the specified type.

void set_integer_native (INTVAL value)

void set_number_native(FLOATVAL value)

Sets the floating-point value.

void set_string_native(STRING *value)

Sets the string value.

void set_pmc(PMC *value)

Sets the PMC *value, calling the appropriate set_* method according to the type of *value.


parrot