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