Fix an exhausted generator bug by converting to list

This commit is contained in:
Josh Klar
2018-10-08 03:59:16 -07:00
parent eca4bf087e
commit aa423e3690

View File

@@ -30,10 +30,10 @@ def unicode_string_sequence(unistring):
Allows sending things like (╯°□°)╯︵ ┻━┻ directly, without Allows sending things like (╯°□°)╯︵ ┻━┻ directly, without
manual conversion to Unicode codepoints. manual conversion to Unicode codepoints.
''' '''
return unicode_codepoint_sequence( return unicode_codepoint_sequence([
hex(get_wide_ordinal(s))[2:] hex(get_wide_ordinal(s))[2:]
for s in unistring for s in unistring
) ])
def unicode_codepoint_sequence(codepoints): def unicode_codepoint_sequence(codepoints):