Theerasak Photha wrote:
> I wrote this for someone else to take an object and list of types,
> then check if obj is one of those types, raising an error otherwise.
note that a call to your function is pretty much equivalent to
assert isinstance(obj, types)
which has the additional advantage that you can provide a more specific
message:
assert isinstance(obj, types), "message"
and also disable the check once you've verified that the code actually
does the right thing.
</F>
--
http://mail.python.org/mailman/listinfo/python-list