Prefer '\0' to None or an empty string for single characters.
This commit is contained in:
parent
58d66ad03b
commit
739793e9bc
2 changed files with 2 additions and 2 deletions
|
@ -400,7 +400,7 @@ def read_tuple(_str):
|
|||
Read a tuple dumped with dump_tumple
|
||||
"""
|
||||
attrs = _str.split(',')
|
||||
char = attrs[2] if len(attrs) > 2 else None
|
||||
char = attrs[2] if len(attrs) > 2 else '\0'
|
||||
return (int(attrs[0]), int(attrs[1])), char
|
||||
|
||||
def to_curses_attr(color_tuple):
|
||||
|
|
|
@ -35,7 +35,7 @@ def parse_attrs(text, previous=None):
|
|||
if next_attr_char + 1 < len(text):
|
||||
attr_char = text[next_attr_char+1].lower()
|
||||
else:
|
||||
attr_char = str()
|
||||
attr_char = '\0'
|
||||
if attr_char == 'o':
|
||||
attrs = []
|
||||
elif attr_char == 'u':
|
||||
|
|
Loading…
Reference in a new issue