/usr/share/doc/python2-docs/html/_sources/c-api
NameSizeModeActions
abstract.rst.txt7020644editdlrm
allocation.rst.txt47960644editdlrm
arg.rst.txt260040644editdlrm
bool.rst.txt13040644editdlrm
buffer.rst.txt229650644editdlrm
bytearray.rst.txt21810644editdlrm
capsule.rst.txt57410644editdlrm
cell.rst.txt19400644editdlrm
class.rst.txt18660644editdlrm
cobject.rst.txt18700644editdlrm
code.rst.txt16350644editdlrm
codec.rst.txt46430644editdlrm
complex.rst.txt40790644editdlrm
concrete.rst.txt19630644editdlrm
conversion.rst.txt70920644editdlrm
datetime.rst.txt64130644editdlrm
descriptor.rst.txt12960644editdlrm
dict.rst.txt77570644editdlrm
exceptions.rst.txt353040644editdlrm
file.rst.txt61980644editdlrm
float.rst.txt33710644editdlrm
function.rst.txt24210644editdlrm
gcsupport.rst.txt65870644editdlrm
gen.rst.txt9200644editdlrm
import.rst.txt112210644editdlrm
index.rst.txt5780644editdlrm
init.rst.txt491600644editdlrm
int.rst.txt45780644editdlrm
intro.rst.txt284730644editdlrm
iter.rst.txt13900644editdlrm
iterator.rst.txt17960644editdlrm
list.rst.txt63620644editdlrm
long.rst.txt79870644editdlrm
mapping.rst.txt28740644editdlrm
marshal.rst.txt39850644editdlrm
memory.rst.txt115560644editdlrm
method.rst.txt20990644editdlrm
module.rst.txt38670644editdlrm
none.rst.txt6970644editdlrm
number.rst.txt119390644editdlrm
objbuffer.rst.txt25160644editdlrm
object.rst.txt174910644editdlrm
objimpl.rst.txt3050644editdlrm
refcounting.rst.txt29340644editdlrm
reflection.rst.txt15670644editdlrm
sequence.rst.txt87160644editdlrm
set.rst.txt65880644editdlrm
slice.rst.txt29790644editdlrm
string.rst.txt154220644editdlrm
structures.rst.txt149660644editdlrm
sys.rst.txt57140644editdlrm
tuple.rst.txt54910644editdlrm
type.rst.txt27610644editdlrm
typeobj.rst.txt669360644editdlrm
unicode.rst.txt451260644editdlrm
utilities.rst.txt4150644editdlrm
veryhigh.rst.txt133630644editdlrm
weakref.rst.txt28200644editdlrm
Edit: /usr/share/doc/python2-docs/html/_sources/c-api/float.rst.txt (3371B)
.. highlightlang:: c .. _floatobjects: Floating Point Objects ---------------------- .. index:: object: floating point .. c:type:: PyFloatObject This subtype of :c:type:`PyObject` represents a Python floating point object. .. c:var:: PyTypeObject PyFloat_Type .. index:: single: FloatType (in modules types) This instance of :c:type:`PyTypeObject` represents the Python floating point type. This is the same object as ``float`` and ``types.FloatType``. .. c:function:: int PyFloat_Check(PyObject *p) Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:type:`PyFloatObject`. .. versionchanged:: 2.2 Allowed subtypes to be accepted. .. c:function:: int PyFloat_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype of :c:type:`PyFloatObject`. .. versionadded:: 2.2 .. c:function:: PyObject* PyFloat_FromString(PyObject *str, char **pend) Create a :c:type:`PyFloatObject` object based on the string value in *str*, or *NULL* on failure. The *pend* argument is ignored. It remains only for backward compatibility. .. c:function:: PyObject* PyFloat_FromDouble(double v) Create a :c:type:`PyFloatObject` object from *v*, or *NULL* on failure. .. c:function:: double PyFloat_AsDouble(PyObject *pyfloat) Return a C :c:type:`double` representation of the contents of *pyfloat*. If *pyfloat* is not a Python floating point object but has a :meth:`__float__` method, this method will first be called to convert *pyfloat* into a float. This method returns ``-1.0`` upon failure, so one should call :c:func:`PyErr_Occurred` to check for errors. .. c:function:: double PyFloat_AS_DOUBLE(PyObject *pyfloat) Return a C :c:type:`double` representation of the contents of *pyfloat*, but without error checking. .. c:function:: PyObject* PyFloat_GetInfo(void) Return a structseq instance which contains information about the precision, minimum and maximum values of a float. It's a thin wrapper around the header file :file:`float.h`. .. versionadded:: 2.6 .. c:function:: double PyFloat_GetMax() Return the maximum representable finite float *DBL_MAX* as C :c:type:`double`. .. versionadded:: 2.6 .. c:function:: double PyFloat_GetMin() Return the minimum normalized positive float *DBL_MIN* as C :c:type:`double`. .. versionadded:: 2.6 .. c:function:: int PyFloat_ClearFreeList() Clear the float free list. Return the number of items that could not be freed. .. versionadded:: 2.6 .. c:function:: void PyFloat_AsString(char *buf, PyFloatObject *v) Convert the argument *v* to a string, using the same rules as :func:`str`. The length of *buf* should be at least 100. This function is unsafe to call because it writes to a buffer whose length it does not know. .. deprecated:: 2.7 Use :func:`PyObject_Str` or :func:`PyOS_double_to_string` instead. .. c:function:: void PyFloat_AsReprString(char *buf, PyFloatObject *v) Same as PyFloat_AsString, except uses the same rules as :func:`repr`. The length of *buf* should be at least 100. This function is unsafe to call because it writes to a buffer whose length it does not know. .. deprecated:: 2.7 Use :func:`PyObject_Repr` or :func:`PyOS_double_to_string` instead.