another puzzled newbie

Steven Taschuk staschuk at telusplanet.net
Thu Aug 28 01:52:32 EDT 2003


Quoth Elaine Jackson:
> The analogous thing works fine in interactive mode, [...]

I'm not sure what this means.

> [...] but when I put it in a
> script, the function singlePass (below) causes a compile-time error.
  [...]
>     postshuffled+=[preshuffled[shuffler[0]]

There's a ']' missing here, which explains the SyntaxError, in
interactive mode or otherwise.

(Btw, there's no need for the parentheses in a del statement;
    del preshuffled[shuffler[0]]  # etc.
is just as effective, and imho better style.)

-- 
Steven Taschuk                               staschuk at telusplanet.net
"[T]rue greatness is when your name is like ampere, watt, and fourier
 -- when it's spelled with a lower case letter."      -- R.W. Hamming





More information about the Python-list mailing list