Is Stackless Python for You?
The same underlying mechanisms are helpful in a much different, and more widely needed, functional domain: text processing. Many programmers find the "regular expressions" available in Perl and other languages, including Python, an epiphany of productivity, in comparison to the byte-oriented procedural pattern-matching they first learned. However, there are language constructs as much more powerful than regular expressions as regular expressions exceed character comparison. Icon, for example, has "generators," which are, roughly speaking, expressions that return multiple values. Generators have resonances with the "functional" features--lambda, map, list comprehensions--that have been added to recent Python releases. A generator efficiently expresses such operations as, "find instances of 'entitlement' in the vicinity of a numeric year after 1994 in the top half of any formatted page." In fact, generators usually have "lazy" semantics so that a monitoring application might begin to display the first instances before the entire document has been scanned.
How Do I Get Stackless Python?
Stackless Python is not part of the standard Python release for either version 1.6 or 2.0. You can, however, download a copy from the Stackless Python home page at www.stackless.com. Stackless Python is sufficiently well-verified that several developers, like independent consultant Gordon McMillan, already rely on it for production deliveries. It's widely expected that stackless elements, probably including microthreads first, will appear in future Python releases, perhaps as early as version 2.1. All the details of syntax and semantics remain provisional, though, as of mid-November 2000.
For deeper explanations of Stackless Python construction and capabilities, see http://starbase.neosoft.com/~claird/comp.lang.python/stackless.html/
Page 2 of 2