misctools
Tools for miscellaneous purposes.
cmp
¶
cmp(a, b)
restores the useful cmp
function previously in Python 2.
Info
Implemented according to What’s New in Python 3.0.
parsebool
¶
parsebool(s)
parses a string to boolean, by whether its lowercase equals to 1
, true
, yes
, positive
, etc.
Tip
Check the full list of acceptable strings in Source.
Chinese is also supported. Support for more languages is welcome to be added by contributors.