Skip to content

Commit

Permalink
feat: converter from array to PyList
Browse files Browse the repository at this point in the history
  • Loading branch information
litlighilit committed Jun 29, 2024
1 parent 0def282 commit 77f634f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pylib/builtins/list.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export sorted, reverse # for openArray
import ./list_decl

export list_decl except asSeq
converter nimArrayAsList*[T; I](arr: array[I, T]): PyList[T] =
newPyList[T](arr)

template len*(self: PyList): int = system.len(asSeq self)

Expand Down

0 comments on commit 77f634f

Please sign in to comment.