What can you do in LISP that you can't do in Python

David LeBlanc whisper at oz.nospamnet
Thu May 17 02:06:45 CEST 2001


In article <mailman.989968823.10208.python-list at python.org>, 
James_Althoff at i2.com says...
> 
> Steven D. Majewski writes:
> >( Smalltalk, instead of having these different forms, has a way
> >   of slinging around unevaluated code blocks as parameters:
> >
> >    object ifTrue: [ block of code to be evaluated ]
> >             ifFalse: [ block of code to be evaluated ]
> 
> And such "slinging" can be *so* satisfying.  I would really enjoy
> "slinging" some unevaluated, unnamed code blocks around in Python when, for
> example, I want to write GUI code like:
> 
> window.showBusyCursorDuring():
>     window.showStatusDuring(msg='Verifying search conditions'):
>         searchForm.verify()
>     window.showStatusDuring(msg='Executing query'):
>         resultSet = searchForm.executeQuery()
> 
> :-)
> 
> Jim
> 
> 
> 
> 
This is more a question:

Would this work?:
sling = """ window.showBusyCursorDuring():
     window.showStatusDuring(msg='Verifying search conditions'):
         searchForm.verify()
     window.showStatusDuring(msg='Executing query'):
         resultSet = searchForm.executeQuery()"""

eval sling

???

Dave LeBlanc



More information about the Python-list mailing list