"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| On 2007-11-20, Terry Reedy <[EMAIL PROTECTED]> wrote:
| > No, it should be defined as resulting in
| >
| > ['a', 1, 'a', 2, 'a', 3, None, 5, None, 7, None, 9] # ;-)
Note smiley.
| I thought deletion of elements would b
On 2007-11-20, Terry Reedy <[EMAIL PROTECTED]> wrote:
> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>| s[i:j:t] = t (1) t must have the same length as the slice it is
> replacing.
>
> This is essentially the same rule as requiring a proper length
> of t for
>
> a,
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| s[i:j:t] = t (1) t must have the same length as the slice it is
replacing.
This is essentially the same rule as requiring a proper length of t for
a,b,c = t # for whatever number of targets
And people have made simil
s[i:j:t] = t (1) t must have the same length as the slice it is
replacing.
Why?
>>> def foo():
... while True:
... yield 'a'
...
>>> foo()
>>> x = range(10)
>>> x[::2] = foo()
This is infinite loop due to Python building a sequence out of
the iterator to check its length.
I think it migh