Larry Bates wrote:
You have name clashing between Python's built in list function
and the variable called list that you pass into the function.
Change the passed in variable name to something else.
I believe Bengt was merely seeking confirmation that this was indeed a
bug in a distributed library
You have name clashing between Python's built in list function
and the variable called list that you pass into the function.
Change the passed in variable name to something else.
Larry Bates
Try something like (not tested):
def flatten(seq):
l = []
for elt in seq:
if isinstance(elt,
On Wed, 19 Jan 2005 04:55:53 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote:
>What am I missing? (this is from 2.4b1, so probably it has been fixed?)
>
I googled and found a bug report, but initial report kind of passes on it
saying nested sequences will probably be tuples, so no panic (my paraphras
What am I missing? (this is from 2.4b1, so probably it has been fixed?)
def flatten(list):
l = []
for elt in list:
--must be expecting list instance or other sequence
t = type(elt)
if t is tuple or t is list:
--looks lik