things I wish python could do
Peter Maas
peter.maas at mplusr.de
Thu May 13 03:46:59 EDT 2004
Ryan Paul wrote:
> 1. many keywords (eg:try/except) are strictly imperative, and cannot be
> used in a functional context.
>
> this really should be possible: map(print,mylist)
To make everything functional in Python would probably be a
huge effort with cosmetic effects only. What about defining
e.g.
def fprint(item):
print item
putting all functional definitions in a module 'functional'
and using it:
from functional import fprint
...
map(fprint, mylist)
Mit freundlichen Gruessen,
Peter Maas
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------
More information about the Python-list
mailing list