On 26 April 2015 at 04:02, Steven D'Aprano <st...@pearwood.info> wrote:

>     for kind in (int, float):
>         try:
>             return kind(astring)
>

That puzzled me for a moment until I remembered you can toss functions
around in Python. Something to play with on a Sunday  afternoon ;')

But aren't most languages going in that direction? (Well, maybe not COBOL)

-- 
Jim

If you only had one hour left to live, would you spend it on Facebook,
Twitter, or Google Plus?
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to