Types
PyTupleObject = ref object of PyObject items*: seq[PyObject] setHash*: bool privateHash*: Hash reprLock*: bool
- Source Edit
Lets
pyTupleObjectType {.inject.} = newPyType("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, []=, tpMethod, pyObjectType, TernaryMethod, ==, PyTypeToken, id, tpMagic, bltinFuncParams, tpSetter, callInplaceMagic, declarePyType, genProperty, typeToAnyKind, magicNames, allowSelfReadWhenBeforeRealWrite, toTypeObject, typeToAnyKind, initPyMemberDef, getDict, $, =trace, callMagic, @, PyObject, PyTypeObject, PyKwArgType, UnaryMethod, getDictUnsafe, forMro, callMagic, reprLock, pyCFuncPragma, =wasMoved, methodMacroTmpl, PyObjectObj, callOnceFinalizerFromDealloc, newPyType, getNameAndArgTypes, initRtArray, pairs, forMroNoSelf, isClass, iterMro, initRtArray, getRORawData, RtArray, pyDestructorPragma, getMagic, registerBltinMethod, idStr, mutable, checkTypeOrRetTE, reprLockWithMsgExpr, tp_free, =copy, callMagic, Py_IS, callTpDel, BltinMethodDef, typeName, implMethod, len, destructor, $, [], checkArgTypes, BinaryMethod, items, checkTypeOrRetTE, BltinFunc, Py_IS_TYPE, registerBltinMethod, castSelf, typeToAnyKind, genProperty, reprLockWithMsg, checkTypeOrRetTE, pyType, MagicMethods, toObjSeq, =destroy, getRawData, ofPyTypeObject, hasDict, tpGetter, castTypeOrRetTE, BltinMethod, PyObjectWithDict, getFun, mro, isType