cpython-3.5.0: Bindings for libpython
Safe HaskellNone
LanguageHaskell2010

CPython.Types

Synopsis

Types and classes

data Bytes Source #

Instances

Instances details
Sequence Bytes Source # 
Instance details

Defined in CPython.Protocols.Sequence

Concrete Bytes Source # 
Instance details

Defined in CPython.Types.Bytes

Methods

concreteType :: Bytes -> Type

Object Bytes Source # 
Instance details

Defined in CPython.Types.Bytes

data Capsule Source #

Instances

Instances details
Concrete Capsule Source # 
Instance details

Defined in CPython.Types.Capsule

Object Capsule Source # 
Instance details

Defined in CPython.Types.Capsule

data Cell Source #

Instances

Instances details
Concrete Cell Source # 
Instance details

Defined in CPython.Types.Cell

Methods

concreteType :: Cell -> Type

Object Cell Source # 
Instance details

Defined in CPython.Types.Cell

data Code Source #

Instances

Instances details
Concrete Code Source # 
Instance details

Defined in CPython.Types.Code

Methods

concreteType :: Code -> Type

Object Code Source # 
Instance details

Defined in CPython.Types.Code

data Complex Source #

Instances

Instances details
Concrete Complex Source # 
Instance details

Defined in CPython.Types.Complex

Object Complex Source # 
Instance details

Defined in CPython.Types.Complex

Number Complex Source # 
Instance details

Defined in CPython.Protocols.Number

data Float Source #

Instances

Instances details
Concrete Float Source # 
Instance details

Defined in CPython.Types.Float

Methods

concreteType :: Float -> Type

Object Float Source # 
Instance details

Defined in CPython.Types.Float

Number Float Source # 
Instance details

Defined in CPython.Protocols.Number

data Function Source #

Instances

Instances details
Concrete Function Source # 
Instance details

Defined in CPython.Types.Function

Object Function Source # 
Instance details

Defined in CPython.Types.Function

data Integer Source #

Instances

Instances details
Concrete Integer Source # 
Instance details

Defined in CPython.Types.Integer

Object Integer Source # 
Instance details

Defined in CPython.Types.Integer

Number Integer Source # 
Instance details

Defined in CPython.Protocols.Number

data List Source #

Instances

Instances details
Sequence List Source # 
Instance details

Defined in CPython.Protocols.Sequence

Concrete List Source # 
Instance details

Defined in CPython.Types.List

Methods

concreteType :: List -> Type

Object List Source # 
Instance details

Defined in CPython.Internal

data Method Source #

Instances

Instances details
Concrete Method Source # 
Instance details

Defined in CPython.Types.Method

Methods

concreteType :: Method -> Type

Object Method Source # 
Instance details

Defined in CPython.Types.Method

data Module Source #

Instances

Instances details
Concrete Module Source # 
Instance details

Defined in CPython.Types.Module

Methods

concreteType :: Module -> Type

Object Module Source # 
Instance details

Defined in CPython.Types.Module

class Object a => AnySet a Source #

Instances

Instances details
AnySet FrozenSet Source # 
Instance details

Defined in CPython.Types.Set

AnySet Set Source # 
Instance details

Defined in CPython.Types.Set

data Set Source #

Instances

Instances details
Concrete Set Source # 
Instance details

Defined in CPython.Types.Set

Methods

concreteType :: Set -> Type

Object Set Source # 
Instance details

Defined in CPython.Types.Set

AnySet Set Source # 
Instance details

Defined in CPython.Types.Set

Number Set Source # 
Instance details

Defined in CPython.Protocols.Number

data FrozenSet Source #

Instances

Instances details
Concrete FrozenSet Source # 
Instance details

Defined in CPython.Types.Set

Object FrozenSet Source # 
Instance details

Defined in CPython.Types.Set

AnySet FrozenSet Source # 
Instance details

Defined in CPython.Types.Set

Number FrozenSet Source # 
Instance details

Defined in CPython.Protocols.Number

data Slice Source #

Instances

Instances details
Concrete Slice Source # 
Instance details

Defined in CPython.Types.Slice

Methods

concreteType :: Slice -> Type

Object Slice Source # 
Instance details

Defined in CPython.Types.Slice

data Tuple Source #

Instances

Instances details
Sequence Tuple Source # 
Instance details

Defined in CPython.Protocols.Sequence

Concrete Tuple Source # 
Instance details

Defined in CPython.Types.Tuple

Methods

concreteType :: Tuple -> Type

Object Tuple Source # 
Instance details

Defined in CPython.Internal

data Type Source #

Instances

Instances details
Concrete Type Source #

Returns True if the first parameter is a subtype of the second parameter.

Instance details

Defined in CPython.Types.Type

Methods

concreteType :: Type -> Type

Object Type Source # 
Instance details

Defined in CPython.Internal

data Unicode Source #

Instances

Instances details
Sequence Unicode Source # 
Instance details

Defined in CPython.Protocols.Sequence

Concrete Unicode Source # 
Instance details

Defined in CPython.Types.Unicode

Object Unicode Source # 
Instance details

Defined in CPython.Types.Unicode

data Proxy Source #

Instances

Instances details
Object Proxy Source # 
Instance details

Defined in CPython.Types.WeakReference

Python Type values

functionType :: Type Source #

Return a new function associated with the given code object. The second parameter will be used as the globals accessible to the function.

The function's docstring, name, and module are retrieved from the code object. The parameter defaults and closure are set to Nothing.

moduleType :: Type Source #

Return a new module object with the name attribute set. Only the module’s doc and name attributes are filled in; the caller is responsible for providing a file attribute.

sliceType :: Type Source #

Return a new slice object with the given values. The start, stop, and step parameters are used as the values of the slice object attributes of the same names. Any of the values may be Nothing, in which case None will be used for the corresponding attribute.

Building and parsing values

iterableToList :: Object iter => iter -> IO List Source #

Convert any object implementing the iterator protocol to a List.

iterableToSet :: Object obj => obj -> IO Set Source #

Return a new Set from the contents of an iterable Object. The object may be Nothing to create an empty set. Throws a TypeError if the object is not iterable.

iterableToFrozenSet :: Object obj => obj -> IO FrozenSet Source #

Return a new FrozenSet from the contents of an iterable Object. The object may be Nothing to create an empty frozen set. Throws a TypeError if the object is not iterable.

fromSet :: AnySet set => set -> IO [SomeObject] Source #

iterableToTuple :: Object iter => iter -> IO Tuple Source #

Convert any object implementing the iterator protocol to a Tuple.