Author christian.heimes
Recipients barry, christian.heimes, gvanrossum, mark.dickinson, mikecurtis, rhettinger
Date 2008-11-11.20:45:41
SpamBayes Score 0.00108128
Marked as misclassified No
Message-id <>
(Comment for Michael, everybody else can safely ignore it.

Instead of writing:
    if isinstance(x, list) or isinstance(x, tuple) or isinstance(x, set):

you can write:
    if isinstance(x, (list, tuple, set)):

or even better:
    if hasattr(x, "__iter__"):

Starting with Python 2.6 you can use "from math import isnan", too.
Date User Action Args
2008-11-11 20:45:42christian.heimessetrecipients: + christian.heimes, gvanrossum, barry, rhettinger, mark.dickinson, mikecurtis
2008-11-11 20:45:42christian.heimessetmessageid: <>
2008-11-11 20:45:41christian.heimeslinkissue4296 messages
2008-11-11 20:45:41christian.heimescreate