wpiformat/wpiformat/__init__.py
def chunks(l, max_len):
    """Yield successive chunks from l whose content lengths sum to less than
    max_len.
    """
    out = []
    size = 0
    for i, arg in enumerate(l):
        out.append(arg)
        size += len(arg) + len(" ")
        if i == len(l) - 1 or size + len(l[i + 1]) > max_len:
            yield out
            out = []
            size = 0
Yield successive chunks from l whose content lengths sum to less than
    max_len.
    
Yield successive chunks from l whose content lengths sum to less than
max_len.
Yield successive chunks from l whose content lengths sum to less than max_len .
def chunks(l, max_len):
    out = []
    size = 0
    for i, arg in enumerate(l):
        out.append(arg)
        size += len(arg) + len(" ")
        if i == len(l) - 1 or size + len(l[i + 1]) > max_len:
            yield out
            out = []
            size = 0
def chunks ( l , max_len ) : out = [ ] size = 0 for i , arg in enumerate ( l ) : out . append ( arg ) size += len ( arg ) + len ( " " ) if i == len ( l ) - 1 or size + len ( l [ i + 1 ] ) > max_len : yield out out = [ ] size = 0
Yield successive chunks from l whose content lengths sum to less than
max_len.
Yield successive chunks from l whose content lengths sum to less than max_len .
"""Yield successive chunks from l whose content lengths sum to less than
    max_len.
    """
l
max_len