Types
PyTupleObject = ref object of PyObject items*: seq[PyObject] setHash*: bool privateHash*: Hash reprLock*: bool
- Source Edit
Lets
pyTupleObjectType {.inject.} = newBltinPyType("tuple", pyObjectType)
- Source Edit
Procs
proc newPyTuple(): PyTupleObject {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
- inner, used by __mul__ method Source Edit
proc newPyTuple(items: seq[PyObject]): PyTupleObject {....raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
proc newPyTuple[T: PyObject](items: openArray[T]): PyTupleObject {.inline.}
- Source Edit
proc newPyTupleSimple(): PyTupleObject {.cdecl, ...raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
proc ofExactPyTupleObject(obj`gensym0: PyObject): bool {.cdecl, inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc ofPyTupleObject(obj`gensym0: PyObject): bool {.cdecl, inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
Macros
macro PyTuple_Pack(args: varargs[typed]): PyTupleObject {.inline.}
-
mainly used for arguments with different types
Example:
let i = newPyTuple() discard PyTuple_Pack(i, PyObject i)
Source Edit
Templates
template PyTuple_Collect(body): PyTupleObject
- EXT. use as std/sugar's collect. this exists as we cannot define PyTuple_New(which accepts int as len) Source Edit
Exports
-
bltinTypes, []=, pyObjectType, TernaryMethod, PyTypeToken, id, bltinFuncParams, $, IntFlag, genProperty, len, newBltinPyType, allowSelfReadWhenBeforeRealWrite, $, toTypeObject, castTypeOrRetTE, getNameAndArgTypes, or, =trace, PyObject, UnaryMethod, getDictUnsafe, forMro, callMagic, ==, implMethod, methodMacroTmpl, forMroNoSelf, RtArray, pyDestructorPragma, newPyType, reprLockWithMsgExpr, tp_free, pairs, registerBltinMethod, callMagic, callTpDel, typeName, isClass, ofPyTypeObject, PY_TPFLAGS, ==, genProperty, pyType, sizeofIntFlag, reprLock, MagicMethods, =destroy, BltinFunc, mutable, hasDict, $, tpGetter, isType, tpMagic, tpSetter, callInplaceMagic, getRORawData, toIntFlag, initRtArray, checkTypeOrRetTE, magicNames, BltinMethodDef, typeToAnyKind, &, initPyMemberDef, callMagic, tpMethod, PyTypeObject, mro, idStr, pyCFuncPragma, &, PyObjectObj, BltinMethod, declareIntFlag, callOnceFinalizerFromDealloc, [], initRtArray, checkTypeOrRetTE, toObjSeq, getDict, iterMro, prepareIntFlagOr, PyKwArgType, getMagic, registerBltinMethod, typeToAnyKind, =copy, Py_IS, destructor, checkArgTypes, BinaryMethod, checkTypeOrRetTE, Py_IS_TYPE, castSelf, declarePyType, typeToAnyKind, reprLockWithMsg, @, ==, declareIntFlag, typeToAnyKind, |, =wasMoved, getRawData, items, PyObjectWithDict, getFun