Is there a Data Type in Python which cannot be typecast in string -
lets 'a' of type (which want know!)
doing thing like:
b = str(a) this should favorably raise typeerror
there no builtin python class raises typeerror str, define custom class:
class foo(object): def __str__(self): raise typeerror('can not stringified') foo = foo() b = str(foo) raises typeerror.
Comments
Post a Comment