(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/fundamental.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/api.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/mapping.html| ]]
|
Python/C API Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/genindex.html| ]]
|
Next: 7.1 Fundamental Objects Up: Python/C API Reference Manual Previous: 6.4 Mapping Protocol
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.
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/fundamental.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/api.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/mapping.html| ]]
|
Python/C API Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/genindex.html| ]]
|
Next: 7.1 Fundamental Objects Up: Python/C API Reference Manual Previous: 6.4 Mapping Protocol
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.
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/otherObjects.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/numericObjects.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/floatObjects.html| ]]
|
Python/C API Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/genindex.html| ]]
|
Next: 7.5 Other Objects Up: 7.4 Numeric Objects Previous: 7.4.3 Floating Point Objects
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.
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/tupleObjects.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/sequenceObjects.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/stringObjects.html| ]]
|
Python/C API Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/152/api/genindex.html| ]]
|
Next: 7.2.3 Tuple Objects Up: 7.2 Sequence Objects Previous: 7.2.1 String Objects
Send comments on this document to python-docs@python.org.
py*