3 number and dot..

Roberto Bonvallet rbonvall at gmail.com
Fri Nov 2 12:39:12 EDT 2007


On 31 oct, 22:21, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> def convert(n):
>    assert type(n) in (int,long)

I'd replace this line with  n = int(n), more in the spirit of duck
typing.

--
Roberto Bonvallet




More information about the Python-list mailing list