No need to type of the variable. str(value) anyways

This commit is contained in:
titoko 2012-12-19 18:04:35 +01:00
parent 36dab1cd02
commit a4dafa8175

View file

@ -45,15 +45,10 @@ def pretty_print_dict(d, depth=0):
elif isinstance(v, list):
print((" ") * depth + ("%s: " % k))
for value in v:
if isinstance(value,str):
print((" ") * (depth+1) + "- " + value)
else:
print((" ") * (depth+1) + "- " +str(value))
print((" ") * (depth+1) + "- " +str(value))
else:
if isinstance(v,str):
print((" ") * depth + "%s: %s" % (k, v))
else:
print((" ") * depth + "%s: %s" % (k, str(v)))
print((" ") * depth + "%s: %s" % (k, str(v)))
def win_msg(astr):
"""
Display a success message if isatty