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 <1226436342.4.0.0360218367388.issue4296@psf.upfronthosting.co.za>
In-reply-to
Content
(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.
)
History
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: <1226436342.4.0.0360218367388.issue4296@psf.upfronthosting.co.za>
2008-11-11 20:45:41christian.heimeslinkissue4296 messages
2008-11-11 20:45:41christian.heimescreate