src/pylib/builtins/list_decl

Source   Edit  

Types

list[T] = ref object
  
Source   Edit  
PyList[T] = list[T]
Source   Edit  

Procs

func `@`[T](ls: PyList[T]): seq[T]
Source   Edit  
func getPtr[T](self: var PyList[T]; i: Natural | BackwardsIndex): ptr T
EXT. unstable. used by Lib/array frombytes and tobytes. Source   Edit  
func newPyList[T](a: openArray[T]): PyList[T]
Source   Edit  
func newPyList[T](len = 0): PyList[T]
Source   Edit  
func newPyList[T](s: seq[T]): PyList[T]
Source   Edit  
func newPyListOfCap[T](cap = 0): PyList[T]
Source   Edit  
func repr[T: set | string | openArray](self: PyList[T]): string
Source   Edit  
func setLen(self: PyList; len: Natural)
EXT. unstable. only works for simple types Source   Edit  

Iterators

iterator items[T](self: PyList[T]): T
Source   Edit  
iterator mitems[T](self: PyList[T]): var T
EXT. Source   Edit  

Converters

converter asSeq[T](self: PyList[T]): seq[T]
Source   Edit  
converter asSeq[T](self: var PyList[T]): var seq[T]
Source   Edit