class Crinja::Tuple
- Crinja::Tuple
- Reference
- Object
Overview
Implementation of a Python Tuple
Included Modules
- Comparable(Crinja::Tuple)
- Crinja::Object
- Indexable(Crinja::Value)
Defined in:
runtime/tuple.crConstructors
Class Method Summary
Instance Method Summary
- #+(item : Value)
- #+(other : Crinja::Tuple)
- #<=>(*args, **options)
- #<=>(*args, **options, &)
- #==(other : Crinja::Tuple)
-
#==(arg)
Returns
false(other can only be aValuehere). - #pretty_print(pp) : Nil
- #size(*args, **options)
- #size(*args, **options, &)
- #to_s(io)
- #to_s(*args, **options)
- #to_s(*args, **options, &)
-
#unsafe_fetch(index : Int) : Value
Returns the element at the given index, without doing any bounds check.
Constructor Detail
Class Method Detail
Instance Method Detail
def ==(arg)
#
Description copied from class Reference
Returns false (other can only be a Value here).
Description copied from module Indexable(Crinja::Value)
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.