Yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/concrete.html
7. Concrete Objects Layer
The functions in this chapter are specific to certain Python object types. Passing them an object of the wrong type is not a good idea; if you receive an object from a Python program and you are not sure that it has the right type, you must perform a type check first; for example. to check that an object is a dictionary, use PyDict_Check(). The chapter is structured like the ``family tree'' of Python object types.
- 7.1 Fundamental Objects
- 7.2 Sequence Objects
- 7.3 Mapping Objects
- 7.4 Numeric Objects
- 7.5 Other Objects
Send comments on this document to python-docs@python.org.
ype.
- int PyComplex_Check (PyObject *p)
- Returns true if its argument is a PyComplexObject.
- PyObject* PyComplex_FromCComplex (Py_complex v)
- Return value: New reference.Create a new Python complex number object from a C Py_complex value.
- PyObject* PyComplex_FromDoubles (double real, double imag)
- Return value: New reference.Returns a new PyComplexObject object from real and imag.
- double PyComplex_RealAsDouble (PyObject *op)
- Returns the real part of op as a C double.
- double PyComplex_ImagAsDouble (PyObject *op)
- Returns the imaginary part of op as a C double.
- Py_complex PyComplex_AsCComplex (PyObject *op)
- Returns the Py_complex value of the complex number op.
Send comments on this document to python-docs@python.org.
- New reference. Returns a new writable buffer object that maintains its own memory buffer of size bytes. ValueError is returned if size is not zero or positive.
Send comments on this document to python-docs@python.org.
py*