any trick to allow anonymous code blocks in python?
ptmcg at austin.stopthespam_rr.com
Sat Jun 26 12:54:27 CEST 2004
> Maybe this relates to the fact that GUI toolkits are mostly C/C++
> based, and that years of limited languages have directed our mind
> toward the 'you have to subclass' dictat. I wonder if SmallTalk GUIs
> have something like this.
Smalltalk supports inline anonymous code blocks, looking something like:
mylist sort: [ :a :b | b-a ]
invokes the sort message on mylist, using a code block with two arguments, a
and b, using b-a as the comparison (implements a descending order sort).
More information about the Python-list