How to determine an object is "scriptable"

abcd codecraig at gmail.com
Thu Mar 30 09:28:46 EST 2006


Daniel Evers wrote:
> Right. You can check this e.g. with
>
>         hasattr(x, "__getitem__")
>
> because the __getitem__ method is used for indexing.

Thanks...that is what I was looking for!




More information about the Python-list mailing list