Py::Sequence

Python sequence classses or types (e.g. builtin list type and tuple type) automatically include this module.

Included Modules:

Enumerable

Methods:

self[nth]

Return nth item. If index is negative, counts from the end. The index of last item is -1. Return nil if nth item is not exists.

self[start..end]

Returns an array containing the objects from start to end.

self[start, length]

Returns an array containing length items from start.

self[nth] = val

Set nth item into val.

each {|item|...}

Iterate over each item.

include?(val)

Return true if sequence contains val.

length
size

Return number of items.


fukusima@goto.info.waseda.ac.jp