Flatten... or How to determine sequenceability?
tdelaney at avaya.com
Mon May 28 03:28:33 CEST 2001
> Alex Martelli wrote:
> > I'm almost tempted to propose a tiny extension module, since
> > the C-API level *DOES* expose an "is-a-sequence" test...:
> or you could import the "operator" module, and use
> the operator.isSequenceType(obj) predicate.
def f (l)
l = list(l)
# not a sequence
More information about the Python-list