[EMAIL PROTECTED] writes:

> >>> import types
> >>> type("") is types.ListType
> False
> >>> type("") is types.StringType
> True
> >>> type([]) is types.StringType
> False
> >>> type([]) is types.ListType
> True

This is even worse than an 'isinstance' check; it refuses even
subclasses of the types you accept, breaking polymorphism *and*
inheritance.

-- 
 \         "What you have become is the price you paid to get what you |
  `\                              used to want."  -- Mignon McLaughlin |
_o__)                                                                  |
Ben Finney

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to