cpython-3.4.0: Bindings for libpython

Safe HaskellNone
LanguageHaskell98

CPython.Types

Contents

Synopsis

Types and classes

Python Type values

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.