unicode_tuple#

View page source

Convert an Iterable Object to a Unicode String#

Syntax#

u_tuple = dismod_at.unicode_tuple ( iterable , quote_string )

iterable#

is any object where we can iterate over its elements and convert each element to a unicode value.

quote_string#

is either True or False . If it is True , each element of iterable that is an str or a unicode is surrounded by the single quote character in u_tuple .

None#

The value None is converted to the unicode string null (always without quotes).

Infinity#

If u_j is a float and equal to plus infinity, the corresponding tuple value has an exponent that is ten times the exponent for the maximum float. This is so that, when written by pythons sqlite package, it gets converted to infinity. Minus infinity is handled in a similar fashion.

u_tuple#

is a unicode string representation of the tuple containing the elements. To be specific it is given by

u_tuple = u ‘( u_1 , u_2 , …, u_n )’

where n is the number of elements and u_1 is the i-th element.

Example#

The file unicode_tuple.py is an example use of unicode_tuple .