|
Unicode character
|
chr(i)
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff. |
|
|
|
|
assert_type(name,
value,
type_,
none_ok=False)
If the value is not of the given type, raise a syntax error. |
source code
|
|
|
|
open_stop(spec)
In Python 2.6 open [] appears to use maxint or similar, which is not
available in Python 3. |
source code
|
|
|
|
lmap(function,
values)
A map that returns a list rather than an iterator. |
source code
|
|
|
|
compose(fun_a,
fun_b)
Functional composition (assumes fun_a takes a single argument). |
source code
|
|
|
|
compose_tuple(fun_a,
fun_b)
Functional composition (assumes fun_b returns a sequence which is supplied
to fun_a via *args). |
source code
|
|
|
|
|
|
|
count(value=0,
step=1)
Identical to itertools.count for recent Python, but 2.6 lacks the step. |
source code
|
|
|
|
safe_in(value,
container,
default=False)
Test for membership without an error for unhashable items. |
source code
|
|
|
|
safe_add(container,
value)
Add items to a container, if they are hashable. |
source code
|
|
|
|
|
|
|
fold(fun,
start,
sequence)
Fold over a sequence. |
source code
|
|
|
|
sample(prefix,
rest,
size=40)
Provide a small sample of a string. |
source code
|
|
|
|
singleton(key,
factory=None)
Manage singletons for various types. |
source code
|
|
|
|
fmt(template,
*args,
**kargs)
Guarantee that template is always unicode, as embedding unicode in ascii
can cause errors. |
source code
|
|
|
|
|
|
|
document(destn,
source,
text=None)
Copy function name and docs. |
source code
|
|
|
|
add_defaults(original,
defaults,
prefix='')
Add defaults to original dict if not already present. |
source code
|
|