Project

General

Profile

« Previous | Next » 

Revision 2963

lists.py: Added mk_seq()

View differences:

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