new object() → {Sk.builtin.object}
Constructor for Python object. All Python classes (builtin and user-defined) should inherit from this class.
Returns:
Python object
- Type
- Sk.builtin.object
Members
(static) pythonFunctions :Array
Array of all the Python functions which are methods of this class.
Type:
- Array
$r
Return the string representation of this instance.
Javascript function, returns Python object.
__eq__
Python wrapper for __eq__ method.
__ge__
Python wrapper for __ge__ method.
__gt__
Python wrapper for __gt__ method.
__hash__
Python wrapper for __hash__ method.
__le__
Python wrapper for __le__ method.
__lt__
Python wrapper for __lt__ method.
__ne__
Python wrapper for __ne__ method.
__repr__
Python wrapper for __repr__ method.
__str__
Python wrapper for __str__ method.
ob$type :Sk.builtin.type
The type object of this class.
Type:
- Sk.builtin.type
tp$name :string
The name of this class.
Type:
- string
Methods
GenericGetAttr() → {undefined}
Returns:
- Type
- undefined
ob$eq(other) → {Sk.builtin.bool|Sk.builtin.NotImplemented}
Perform equality check between this instance and a Python object (i.e. this == other).
Implements __eq__ dunder method.
Javascript function, returns Python object.
Parameters:
| Name | Type | Description | 
|---|---|---|
| other | Object | The Python object to check for equality. | 
Returns:
true if equal, false otherwise
ob$ge(other) → {Sk.builtin.bool|Sk.builtin.NotImplemented}
Determine if this instance is greater than or equal to a Python object (i.e. this >= other).
Implements __ge__ dunder method.
Javascript function, returns Python object.
Parameters:
| Name | Type | Description | 
|---|---|---|
| other | Object | The Python object to compare. | 
Returns:
true if this >= other, false otherwise
ob$gt(other) → {Sk.builtin.bool|Sk.builtin.NotImplemented}
Determine if this instance is greater than a Python object (i.e. this > other).
Implements __gt__ dunder method.
Javascript function, returns Python object.
Parameters:
| Name | Type | Description | 
|---|---|---|
| other | Object | The Python object to compare. | 
Returns:
true if this > other, false otherwise
ob$le(other) → {Sk.builtin.bool|Sk.builtin.NotImplemented}
Determine if this instance is less than or equal to a Python object (i.e. this <= other).
Implements __le__ dunder method.
Javascript function, returns Python object.
Parameters:
| Name | Type | Description | 
|---|---|---|
| other | Object | The Python object to compare. | 
Returns:
true if this <= other, false otherwise
ob$lt(other) → {Sk.builtin.bool|Sk.builtin.NotImplemented}
Determine if this instance is less than a Python object (i.e. this < other).
Implements __lt__ dunder method.
Javascript function, returns Python object.
Parameters:
| Name | Type | Description | 
|---|---|---|
| other | Object | The Python object to compare. | 
Returns:
true if this < other, false otherwise
ob$ne(other) → {Sk.builtin.bool|Sk.builtin.NotImplemented}
Perform non-equality check between this instance and a Python object (i.e. this != other).
Implements __ne__ dunder method.
Javascript function, returns Python object.
Parameters:
| Name | Type | Description | 
|---|---|---|
| other | Object | The Python object to check for non-equality. | 
Returns:
true if not equal, false otherwise
tp$hash() → {Sk.builtin.int_}
Return the hash value of this instance.
Javascript function, returns Python object.
Returns:
The hash value
- Type
- Sk.builtin.int_