[Tutor] please help!

Don Arnold Don Arnold" <darnold02@sprynet.com
Sat Jan 11 16:34:01 2003


----- Original Message -----
From: "Magnus Lycka" <magnus@thinkware.se>
To: "Don Arnold" <darnold02@sprynet.com>; "Gregor Lingl" <glingl@aon.at>;
"geraldine lynch" <gerilynch@yahoo.co.uk>
Cc: <tutor@python.org>
Sent: Saturday, January 11, 2003 11:48 AM
Subject: Re: [Tutor] please help!


> At 10:39 2003-01-11 -0600, Don Arnold wrote:
> >   if type(arg) in (list,tuple):
>
> I avoided this construct and checked whether the object had a
> __len__ atribute instead. My thought was that it would be good
> if it worked also with classes that act like sequences etc.
>
>
> --
> Magnus Lycka, Thinkware AB
> Alvans vag 99, SE-907 50 UMEA, SWEDEN
> phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
> http://www.thinkware.se/  mailto:magnus@thinkware.se
>

Good point. I hadn't thought of that.

Don