implementations which have non-idempotent len() functions, so that
the test `if db' doesn't return the same result every time (!). By
explicitly testing whether db is None rather than returning false if
db is non-None but inexplicably returns zero from len(), we avoid
the problem in favour of the semantics I actually intended.
git-svn-id: svn://svn.tartarus.org/sgt/utils@6715
cda61777-01e9-0310-a592-
d414129be87e
return s
def charname(x):
- if db:
+ if db is not None:
key = hexstr(x)
while len(key) < 4: key = "0" + key
key = string.upper(key)