Sha256: c3edd9340dfe075017cbec923aa2c9bbae298e1911b3ae81c87a62ed6d527ee4
Contents?: true
Size: 713 Bytes
Versions: 14
Compression:
Stored size: 713 Bytes
Contents
module PyCall List = builtins.list class List register_python_type_mapping include Enumerable def include?(item) LibPython::Helpers.sequence_contains(__pyptr__, item) end def length PyCall.len(self) end def each return enum_for unless block_given? LibPython::Helpers.sequence_each(__pyptr__, &proc) self end def <<(item) append(item) end def push(*items) items.each {|i| append(i) } end def sort dup.sort! end def sort! LibPython::Helpers.getattr(__pyptr__, :sort).__call__ self end def to_a Array.new(length) {|i| self[i] } end alias to_ary to_a end end
Version data entries
14 entries across 14 versions & 1 rubygems