struct Crython::PyList
- Crython::PyList
- Struct
- Value
- Object
Included Modules
- Crython::ObjectProtocol
- Indexable(Crython::PyObject)
Defined in:
crython/list.crConstructors
Instance Method Summary
- #[]=(index : Int32, value : T) forall T
-
#size : Int32
Returns the number of elements in this container.
-
#unsafe_fetch(index : Int)
Returns the element at the given index, without doing any bounds check.
Instance methods inherited from module Crython::ObjectProtocol
<=>(other : ObjectProtocol)
<=>,
callable? : Bool
callable?,
del_attr(attr : String) : Bool
del_attr,
get_attr(attr : String) : PyObject
get_attr,
has_attr?(attr : String) : Bool
has_attr?,
none?
none?,
set_attr(attr : String, obj : ObjectMethods)
set_attr,
to_unsafe
to_unsafe
Constructor Detail
Instance Method Detail
def size : Int32
#
Description copied from module Indexable(Crython::PyObject)
Returns the number of elements in this container.
def unsafe_fetch(index : Int)
#
Description copied from module Indexable(Crython::PyObject)
Returns the element at the given index, without doing any bounds check.
Indexable makes sure to invoke this method with index in 0...size,
so converting negative indices to positive ones is not needed here.
Clients never invoke this method directly. Instead, they access
elements with #[](index) and #[]?(index).
This method should only be directly invoked if you are absolutely sure the index is in bounds, to avoid a bounds check for a small boost of performance.