python.type

A D API for dealing with Python's PyTypeObject

Members

Classes

ArgsException
class ArgsException
Undocumented in source.
ArgumentConversionException
class ArgumentConversionException
Undocumented in source.

Enums

isDateOrDateTime
eponymoustemplate isDateOrDateTime(T)
Undocumented in source.
isNonRangeUDT
eponymoustemplate isNonRangeUDT(T)
Undocumented in source.
isPhobos
eponymoustemplate isPhobos(T)
Undocumented in source.
isTuple
eponymoustemplate isTuple(T)
Undocumented in source.
isUserAggregate
eponymoustemplate isUserAggregate(T)
Undocumented in source.

Functions

noThrowable
auto noThrowable(A args)
Undocumented in source. Be warned that the author may not have intended to support it.
pythonArgsToDArgs
auto pythonArgsToDArgs(PyObject* args, PyObject* kwargs)
Undocumented in source. Be warned that the author may not have intended to support it.
pythonCallable
PyObject* pythonCallable(T callable)
Undocumented in source. Be warned that the author may not have intended to support it.
pythonClass
PyObject* pythonClass(T dobj)

Creates an instance of a Python class that is equivalent to the D type T. Return PyObject*.

userAggregateInit
T userAggregateInit()
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

PythonClass
struct PythonClass(T)

A Python class that mirrors the D type T. For instance, this struct:

PythonFunction
struct PythonFunction(alias F)

The C API implementation that calls a D function F.

PythonMethod
struct PythonMethod(T, alias F)

The C API implementation of a Python method F of aggregate type T

PythonType
struct PythonType(T)

A wrapper for PyTypeObject.

Variables

gFactory
Object delegate(PyObject*)[string] gFactory;

OOP types register factory functions here, indexed by the fully qualified name of the type. This allows us to construct D class types from the runtime types of Python values.

Meta