Revision 135
Added by Aaron Marcuse-Kubitza about 13 years ago
util.py | ||
---|---|---|
1 | 1 |
# Useful functions and classes |
2 | 2 |
|
3 |
def module(value): return type(value).__module__.split('.') |
|
4 |
|
|
5 |
def root_module(value): return module(value)[0] |
|
6 |
|
|
7 |
def first(iter_): return iter_.next() |
|
8 |
|
|
3 | 9 |
def skip(iter_, func): |
4 | 10 |
# Advance iter while func is True |
5 | 11 |
try: |
Also available in: Unified diff
map: Implemented DB input support for querying a single table