module PyBind::PySequence

Public Instance Methods

each() { |self| ... } click to toggle source
# File lib/pybind/types/sequence.rb, line 12
def each
  return enum_for unless block_given?
  size.times do |i|
    yield self[i]
  end
  self
end
include?(value) click to toggle source
# File lib/pybind/types/sequence.rb, line 5
def include?(value)
  value = value.to_python
  value = LibPython.PySequence_Contains(@pystruct, value)
  raise PyError.fetch if value == -1
  value == 1
end
to_a() click to toggle source
# File lib/pybind/types/sequence.rb, line 20
def to_a
  each.to_a
end
Also aliased as: to_ary
to_ary()
Alias for: to_a