Revision 2963
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/lists.py | ||
---|---|---|
4 | 4 |
return (isinstance(value, list) or isinstance(value, tuple) |
5 | 5 |
or isinstance(value, set)) |
6 | 6 |
|
7 |
def mk_seq(value): |
|
8 |
if not is_seq(value): value = [value] |
|
9 |
return value |
|
10 |
|
|
7 | 11 |
def clear(list_): |
8 | 12 |
while True: |
9 | 13 |
try: list_.pop() |
Also available in: Unified diff
lists.py: Added mk_seq()