Python syntax in Lisp and Scheme

Alex Martelli aleax at aleax.it
Sat Oct 4 15:53:48 EDT 2003


Alexander Schmolck wrote:

> [comp.lang.functional removed]
> Peter Seibel <peter at javamonkey.com> writes:
> 
>> which seems pretty similar to the Python version.
>> 
>> (If of course we didn't already have the FILL function that does just
>> that.)
> 
> Just for the record, in python all you'd write is: v[:] = a
> 
> 'as

I suspect you may intend "v[:] = [a]*len(v)", although a good alternative
may also be "v[:] = itertools.repeat(a, len(v))".


Alex





More information about the Python-list mailing list