C# Класс Python.Runtime.PyFloat

Represents a Python float object. See the documentation at http://www.python.org/doc/current/api/floatObjects.html
Наследование: PyNumber
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AsFloat ( PyObject value ) : PyFloat

AsFloat Method

Convert a Python object to a Python float if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "float(object)".

IsFloatType ( PyObject value ) : bool

IsFloatType Method

Returns true if the given object is a Python float.

PyFloat ( IntPtr ptr ) : System

PyFloat Constructor

Creates a new PyFloat from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.

PyFloat ( PyObject o ) : System

PyFloat Constructor

Copy constructor - obtain a PyFloat from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python float object.

PyFloat ( double value ) : System

PyFloat Constructor

Creates a new Python float from a double value.

PyFloat ( string value ) : System

PyFloat Constructor

Creates a new Python float from a string value.

Описание методов

AsFloat() публичный статический Метод

AsFloat Method
Convert a Python object to a Python float if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "float(object)".
public static AsFloat ( PyObject value ) : PyFloat
value PyObject
Результат PyFloat

IsFloatType() публичный статический Метод

IsFloatType Method
Returns true if the given object is a Python float.
public static IsFloatType ( PyObject value ) : bool
value PyObject
Результат bool

PyFloat() публичный Метод

PyFloat Constructor
Creates a new PyFloat from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.
public PyFloat ( IntPtr ptr ) : System
ptr System.IntPtr
Результат System

PyFloat() публичный Метод

PyFloat Constructor
Copy constructor - obtain a PyFloat from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python float object.
public PyFloat ( PyObject o ) : System
o PyObject
Результат System

PyFloat() публичный Метод

PyFloat Constructor
Creates a new Python float from a double value.
public PyFloat ( double value ) : System
value double
Результат System

PyFloat() публичный Метод

PyFloat Constructor
Creates a new Python float from a string value.
public PyFloat ( string value ) : System
value string
Результат System