Handbook
Glossary
init-py-type-dispatch ( -- table )
Vocabulary
python
Inputs
None
Outputs
table
an
object
Definition
USING:
assocs
kernel
python.ffi
sequences
;
IN:
python
:
init-py-type-dispatch
( -- table )
H{
{
"dict"
[
py-dict>hashtable
[
[
py>
]
bi@
]
assoc-map
]
}
{
"bytes"
[
py-bytes>byte-array
]
}
{
"str"
[
py-unicode>string
]
}
{
"int"
[
PyLong_AsLong
]
}
{
"NoneType"
[
drop
f
]
}
{
"list"
[
py-list>vector
[
py>
]
map
]
}
{
"bool"
[
PyObject_IsTrue
1
=
]
}
{
"tuple"
[
py-tuple>array
[
py>
]
map
]
}
}
clone
;