Why is Python popular, while Lisp and Scheme aren't?

Patrick W patrickw106 at yahoo.com.au
Sat Nov 23 23:58:57 EST 2002


Martti Halminen <martti.halminen at kolumbus.fi> writes:

> Alexander Schmolck wrote:
> 
> > for item in container:             ; no convienient idiom (?)
> >     print item
> 
>               - For printing the usual idiom is usually just (print
> container), though hash tables do not have a defined machine-readable
> output form. Nothing to prevent you from defining one.

And for acting upon each item within a container, the usual idiom is
(mapcar #'function list) or (map 'output-type #'function sequence).
The various mapping functions in Lisp remove a lot of the need for
explicit loops (similar to the way in which list comprehensions
replace many loops in modern Python).



More information about the Python-list mailing list