typechecks: just say no! (was Re: Determining Types)

Emile van Sebille emile at fenx.com
Mon Sep 3 11:09:45 EDT 2001


Couldn't you always coerce it?

str('hello')
str(123)


--

Emile van Sebille
emile at fenx.com

---------
"Skip Montanaro" <skip at pobox.com> wrote in message
news:mailman.999528483.6865.python-list at python.org...
>
> One place that I've actually found typechecking useful is at the boundary
of
> my XML-RPC server.  If I'm expecting a string input (say, the name of a
> band) and someone on the other side inputs "311" to a Perl-based website
> which then passes the query to my server, I get an integer that I have to
> coerce back to a string.  In my comments I call it a "Perl guard". ;-)
>
> --
> Skip Montanaro (skip at pobox.com)
> http://www.mojam.com/
> http://www.musi-cal.com/
>




More information about the Python-list mailing list