"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 be more similar to slice | assignment, e.g.: | | x[5:] = [] | --> [0, 1, 2, 3, 4] | -/ /-> [0, 1, 2, 3, 4, None, None, None, None, None] | | > Or better yet, require the programmer to specify by modifying | > either the target or source spec, as is done now. | | It seems a shame to accept iterators but to build a sequence out | of them, if it can be avoided. But if there's too much confusion | about what it should mean, I guess that kills the idea. For the core, we agree. For your personal use, completing def repdel(museq, slise, source): "Replace or delete museq[slise] with items from source" ... with the behavior you want should not be too difficult. tjr -- http://mail.python.org/mailman/listinfo/python-list