def dcross(**keywords):
keys = keywords.keys()<EOL>sequences = [keywords[key] for key in keys]<EOL>wheels = map(iter, sequences)<EOL>digits = [it.next( ) for it in wheels]<EOL>while True:<EOL><INDENT>yield dict(zip(keys, digits))<EOL>for i in range(len(digits)-<NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>):<EOL><INDENT>try:<EOL><INDENT>digits[i] = wheels[i].next( )<EOL>break<EOL><DEDENT>except StopIteration:<EOL><INDENT>wheels[i] = iter(sequences[i])<EOL>digits[i] = wheels[i].next( )<EOL><DEDENT><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Similar to cross(), but generates output dictionaries instead of tuples.