How to coerce a list of vars into a new type?
bkhl at stp.lingfil.uu.se
Mon Oct 2 19:42:19 CEST 2006
bearophilehugs at lycos.com:
> def f(a, b, c):
> map(int, [a, b, c])
> What it does is to: "verify that three parameters can all be converted
> into integers, but it doesn't modify the parameters themselves" as the
> OP asked.
I would probably put that map in an assert statement, to make the
Björn Lindström <bkhl at stp.lingfil.uu.se>
Student of computational linguistics, Uppsala University, Sweden
More information about the Python-list