Chanelling Guido - dict subclasses
John Ladasky
john_ladasky at sbcglobal.net
Wed Jan 15 11:51:28 EST 2014
On Wednesday, January 15, 2014 12:40:33 AM UTC-8, Peter Otten wrote:
> Personally I feel dirty whenever I write Python code that defeats duck-
> typing -- so I would not /recommend/ any isinstance() check.
While I am inclined to agree, I have yet to see a solution to the problem of flattening nested lists/tuples which avoids isinstance(). If anyone has written one, I would like to see it, and consider its merits.
More information about the Python-list
mailing list