Creating Python class wrapper for a command line tool
Edvard Majakari
edvard+news at majakari.net
Thu May 27 01:42:26 EDT 2004
Peter Otten <__peter__ at web.de> writes:
> You could test object identity instead.
>
>>>> def isbool(b):
> ... return b is True or b is False
Ah. Should have tried (I almost thought of that myself, but then I
remembered 1 == True and thought it wouldn't work. But I forgot there's
magic in Python ;)
This works great with Python2.2. Thanks!
--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!
$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";
More information about the Python-list
mailing list