On 09/09/2010 17.05, Joel Goldstick wrote:


On Thu, Sep 9, 2010 at 10:26 AM, Luke Paireepinart
<rabidpoob...@gmail.com <mailto:rabidpoob...@gmail.com>> wrote:

    Shouldn't there be a way to do this without type checking? Duck typing!

Your post got me thinking.  Maybe better to test if the object can
return an iter method.  If it throws an error, then look at its value.
If it doesn't, then its a list or a tuple

... Oh, my ...

I think type checking is simpler. Maybe not that duckly, but...

Francesco
Nessun virus nel messaggio in uscita.
Controllato da AVG - www.avg.com
Versione: 9.0.851 / Database dei virus: 271.1.1/3121 -  Data di rilascio: 
09/08/10 08:07:00
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to