PySequence_Check

Reuben Sumner rasumner at bach.wisdom.weizmann.ac.il
Tue Jun 29 09:54:33 EDT 1999


How can I do the equivalent of a PySequence_Check in Python?
GvR told me that the question was illdefined (if I explained it correctly)
and to ask here.  It seems that some of the functions in abstract.h
are available from python (len(), callable()) and others are not
(PySequence_Check, PyNumber_Check).

What am I missing?  I have a nested structure of lists and tuple and I
just want to know when I have bottomed out.  I can check for tuple or
list indivually but that is ugly and inflexible.  I could just try
indexing and see if there was an exception but that is not much better.

Reuben




More information about the Python-list mailing list