<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-23160166</atom:id><lastBuildDate>Mon, 02 Nov 2009 12:23:50 +0000</lastBuildDate><title>Gizmo Web</title><description></description><link>http://gizmoweblog.blogspot.com/</link><managingEditor>noreply@blogger.com (mario ruggier)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-2651439194778163185</guid><pubDate>Tue, 20 Jan 2009 16:24:00 +0000</pubDate><atom:updated>2009-01-20T17:41:37.364+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>evoque templating python</category><title>Evoque Templating v0.4 for Python 3.0</title><description>Version 0.4 of &lt;a href="http://evoque.gizmojo.org/"&gt;Evoque Templating&lt;/a&gt; is out. Highlights include:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Support for Python 3.0&lt;br /&gt;The same Evoque code base now runs on Python 2.4, 2.5, 2.6 and 3.0 -- possibly making Evoque the first full-featured template engine available for Python 3.0. Behaviour is identical on all four Python versions.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Tighter lockdown of the in-process sandbox (restricted mode)&lt;br /&gt;Primarily by an elaborated runtime scan of all expressions that are passed for evaluation. See the overview of how Evoque &lt;a href="http://evoque.gizmojo.org/usage/restricted/"&gt;implements the in-process sandbox&lt;/a&gt;. And yes, do interpret this as an open challenge and invitation to try and break it , and, in the unlikely chance that you succeed, you may request anything you like as compensation, as long as it is beer ;-) Want a &lt;a href="http://groups.google.com/group/comp.lang.python/msg/f6f0dfd67609f370"&gt;quick and dirty script&lt;/a&gt; to run devious templates?&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Revision of whitespace handling&lt;br /&gt;Notably, reworked the meaning of the &lt;span style="font-style: italic;"&gt;slurpy_directives=True&lt;/span&gt; mode to be more what most people seem to expect.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Continued speed improvements&lt;br /&gt;More minor performance optimizations. Evoque is fast, and is a real contender for the dubious but gratifying honour of &lt;span style="font-style: italic;"&gt;overall fastest pure-python template engine&lt;/span&gt;. Included in the distribution are 3 benchmarks -- you can see the &lt;a href="http://evoque.gizmojo.org/benchmark/"&gt;measured results on OS X 10.5 for Python 2.6.1&lt;/a&gt; (as there is not much to benchmark against on Python 3.0) -- those numbers are a real tribute to python's conceptual integrity -- that rewards a straightforward implementation of a simple design with... amazing performance.&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;See &lt;a href="http://evoque.gizmojo.org/changelog/"&gt;full changelog&lt;/a&gt;. It is curious to note that all those changes added a whopping 20 SLOC to the 972 count of the preceeding release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-2651439194778163185?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2009/01/evoque-templating-v04-for-python-30.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-3775472182204393790</guid><pubDate>Wed, 12 Mar 2008 11:40:00 +0000</pubDate><atom:updated>2008-03-13T11:10:40.629+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>evoque</category><category domain='http://www.blogger.com/atom/ns#'>mako</category><category domain='http://www.blogger.com/atom/ns#'>templating</category><category domain='http://www.blogger.com/atom/ns#'>python</category><category domain='http://www.blogger.com/atom/ns#'>benchmark</category><title>Fastest pure python text-based templating?</title><description>&lt;a href="http://www.makotemplates.org/"&gt;Mako&lt;/a&gt; is a mature full-featured templating engine for python. It is also pure-python i.e. it has no C-compiled extensions, and amongst pure-python systems it is currently considered to be the fastest.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://evoque.gizmojo.org/"&gt;Evoque&lt;/a&gt; is a new lightweight templating engine for python, also pure-python and full-featured. Its simple implementation is based on the eval python builtin, and weighs in at less than 1K lines of code, compared to about 2.5K for Mako, or about 4K for Genshi. One of Evoque's distinguishing features is &lt;span style="font-style: italic;"&gt;automatic input quoting&lt;/span&gt; that, to my knowledge, Mako does not do, at least not by default.&lt;br /&gt;&lt;br /&gt;It is difficult to make sensical performance comparisons between systems -- never do such comparisons give the entire picture. I will try to highlight the specific performance results for Evoque in &lt;span style="font-style: italic;"&gt;manual quoting mode&lt;/span&gt; (called &lt;span style="font-weight: bold;"&gt;evoque_mq&lt;/span&gt; when used this way) and those for Mako -- two systems that come close to being equivalent. The Evoque distribution contains the &lt;a href="http://evoque.gizmojo.org/benchmark/"&gt;following three benchmarks&lt;/a&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;subs&lt;/span&gt; - does only  string substitutions &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;basic&lt;/span&gt; - does a variety of standard templating tasks  such as looping, calling sub-templates, escaping of data&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;bigtable&lt;/span&gt; - a simple brute force generation of a 10 columns x 1000 rows table&lt;/li&gt;&lt;/ul&gt;These three benchmarks are run on two different platforms, as indicated below, under python 2.5.1 in each case. All times are in milliseconds (less is better).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OS X 10.3 on a 667 MHz G4 PowerBook&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;             subs    basic    bigtable&lt;br /&gt;evoque_mq    0.27    2.26     409.71&lt;br /&gt;mako         0.72    2.73     445.47&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Ubuntu 7.04 on a 2.0 GHz Intel Celeron&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;             subs    basic    bigtable&lt;br /&gt;evoque_mq    0.13    1.25     152.12&lt;br /&gt;mako         0.38    1.28     142.53&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://evoque.gizmojo.org/"&gt;Evoque&lt;/a&gt; is &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; always faster. It seems to be consistently faster for simpler templates, while Mako seems to be quicker on loop-intensive templates, such as the 1000 row table benchmark. This is probably  because of additional work that Evoque has to do  for the runtime evaluation of loop variables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-3775472182204393790?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2008/03/fastest-pure-python-text-based.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-7753778994658017642</guid><pubDate>Wed, 12 Mar 2008 10:25:00 +0000</pubDate><atom:updated>2008-03-12T11:54:08.196+01:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>evoque</category><category domain='http://www.blogger.com/atom/ns#'>qpy</category><category domain='http://www.blogger.com/atom/ns#'>templating</category><category domain='http://www.blogger.com/atom/ns#'>xml</category><category domain='http://www.blogger.com/atom/ns#'>python</category><category domain='http://www.blogger.com/atom/ns#'>html</category><title>Evoque - managed eval-based templating</title><description>Released the first version 0.1 of the lightweight, capable and fast Evoque templating engine on Saturday 7 March -- &lt;a href="http://groups.google.com/group/comp.lang.python.announce/browse_thread/thread/ece039b06f5918b6/dd3da485fef8a651#dd3da485fef8a651"&gt;see comp.lang.python.announce announcement&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Evoque's distinguishing factors are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;automatic input quoting, i.e. XSS protection. To my knowledge no other text-based templating system has this feature. This is achieved thanks to &lt;a href="http://www.mems-exchange.org/software/qpy/"&gt;Qpy's quoted-string h8 class&lt;/a&gt;, although  any other quoted-string class may be used instead. &lt;/li&gt;&lt;li&gt;a restricted execution mode, to be able to safely expose templates for editing to untrusted clients. To facilitate this, only python expressions are allowed, i.e. nothing is ever exec'ed. &lt;/li&gt;&lt;li&gt;small footprint -- under 1K lines of code -- yet full-featured, e.g. elaborate cache management, template inheritance, versatile template addressing. &lt;/li&gt;&lt;li&gt;a contender for the &lt;span style="font-weight: bold;"&gt;fastest&lt;/span&gt; pure python templating engine currently out there. See &lt;a href="http://evoque.gizmojo.org/benchmark/"&gt;some comparative performance benchmarks&lt;/a&gt; -- in particular compared with Mako that is currently considered to be the fastest text-based templating system. &lt;/li&gt;&lt;/ul&gt;Home page for Evoque is: &lt;a href="http://evoque.gizmojo.org/"&gt;http://evoque.gizmojo.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-7753778994658017642?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2008/03/evoque-managed-eval-based-templating.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-117126702793655223</guid><pubDate>Mon, 12 Feb 2007 07:44:00 +0000</pubDate><atom:updated>2007-02-12T23:15:25.656+01:00</atom:updated><title>2 Million Page Views a Day with Quixote</title><description>Bo Yang send &lt;a href="http://mail.mems-exchange.org/durusmail/quixote-users/5657/"&gt;this small note&lt;/a&gt; to the &lt;a href="http://mail.mems-exchange.org/durusmail/quixote-users/"&gt;Quixote mailing list&lt;/a&gt; this past Thursday, that I repoduce almost entirely below:&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Just to report-in the progress we're making with a real-world Quixote installation: yesterday douban.com celebrated its first 2 million- pageview day. Quixote generated 2,058,207 page views. In addition, there're about 640,000 search-engine requests. These put the combined requests at  around 2.7 millions. All of our content pages are dynamic, including the help and about-us pages.&lt;br /&gt;&lt;br /&gt;We're still wondering if we're the busiest one of all the python/ruby supported websites in the world.&lt;br /&gt;&lt;br /&gt;Quixote runs on one dual-core home-made server (costed us US$1500). We have three additional servers dedicated to lighttpd and mysql. We use memcached extensively as well.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.douban.com/"&gt;Douban.com&lt;/a&gt; is the most visible python establishment on the Chinese web, so there's been quite a few django vs. quixote threads in the Chinese language python user mailing lists.&lt;/blockquote&gt;So, the question "&lt;a href="http://gizmoweblog.blogspot.com/2006/03/busiest-site-is-powered-by-quixote.html"&gt;Is busiest site powered by Quixote?&lt;/a&gt;" is still a very valid one...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-117126702793655223?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2007/02/2-million-page-views-day-with-quixote.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-116151134001582871</guid><pubDate>Sun, 22 Oct 2006 09:21:00 +0000</pubDate><atom:updated>2006-10-22T12:27:46.113+02:00</atom:updated><title>Putting lipstick on a Pig</title><description>The question of what kind of database one should use has triggered many a techno-emotional conclusion-less  discussion. The juiciest bone of contention is whether to use a Relational Database coupled with an Object Relational Mapper, or to just simply use an Object Database.&lt;br /&gt;&lt;br /&gt;Well, here's a nice pre-emptive image summarizing the situation rather succintly... Mike Orr, replying to a &lt;a href="http://mail.mems-exchange.org/durusmail/quixote-users/5598/"&gt;specific question about comparisons&lt;/a&gt; between an ORM such as SQLObject coupled with MySQL for example, and the Durus Object Database, &lt;a href="http://mail.mems-exchange.org/durusmail/durus-users/749/"&gt;drops this&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;Object-relational mappers are like putting lipstick on a pig.&lt;/blockquote&gt;Going on to add:&lt;br /&gt;&lt;blockquote&gt;If you think foreign keys, flat tables, etc are programmer friendly, you haven't used an object database. Literally 90% of the work disappears.  The SQLObject and SQLAlchemy manuals are a hundred pages because even trying to put an OO front end on a SQL database is a complex task.&lt;br /&gt;&lt;/blockquote&gt;Pretty much sums it up for me. Still, if you need more argument fodder, here's &lt;a href="http://phd.pp.ru/Software/OODB/"&gt;some nicely digested material about Object Databases&lt;/a&gt;, and how they compare with Relational Databases, from Oleg Broytmann.&lt;br /&gt;&lt;br /&gt;While I'm at it, I should probably also mention that performance is one of the strongest points typically held in favour of Relational databases. Well, that is definitely not always the case. Mike Orr reports how, on his application, &lt;a href="http://mail.mems-exchange.org/durusmail/quixote-users/5524/"&gt;Durus proved to be more performant than both MySQL and Sqlite&lt;/a&gt;. This while not forgetting of course how much easier Durus is to work with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-116151134001582871?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2006/10/putting-lipstick-on-pig.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-114434765887148738</guid><pubDate>Thu, 06 Apr 2006 17:59:00 +0000</pubDate><atom:updated>2006-04-06T20:26:37.456+02:00</atom:updated><title>New QP release is more open</title><description>The newly released &lt;a href="http://www.mems-exchange.org/software/qp/"&gt;QP&lt;/a&gt; version 1.5 is good news! It is now a lot easier than before to create &lt;a href="http://www.mems-exchange.org/software/qp/"&gt;QP&lt;/a&gt; sites that (a) do not use the default &lt;span style="font-style: italic;"&gt;Directory-based&lt;/span&gt; URL traversal, (b) use a database other than the &lt;a href="http://www.mems-exchange.org/software/durus/"&gt;Durus&lt;/a&gt; object database, that is the persistence system used by default, and (c) do not use a database at all!&lt;br /&gt;&lt;br /&gt;Some thread-awareness has also been added to the &lt;span style="font-style: italic;"&gt;Publisher&lt;/span&gt;, to make it easier to run &lt;a href="http://www.mems-exchange.org/software/qp/"&gt;QP&lt;/a&gt; sites in multi-threaded contexts. &lt;a href="http://www.mems-exchange.org/software/qp/"&gt;QP&lt;/a&gt; sites are generally single-thread multi-process deployments. In this same vein, a __call__ method has been added to the &lt;span style="font-style: italic;"&gt;Publisher&lt;/span&gt;, to make it more WSGI friendly.&lt;br /&gt;&lt;br /&gt;Mucking with the included demo sites, it was also a pleasant surprise to find the "quickie wiki" simple wiki module, that is a really clear, small but functional example of how one would go about building web applications with &lt;a href="http://www.mems-exchange.org/software/qp/"&gt;QP&lt;/a&gt; and &lt;a href="http://www.mems-exchange.org/software/durus/"&gt;Durus&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-114434765887148738?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2006/04/new-qp-release-is-more-open.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-114241056341843073</guid><pubDate>Wed, 15 Mar 2006 08:01:00 +0000</pubDate><atom:updated>2006-03-15T09:16:03.430+01:00</atom:updated><title>New storage backends for Durus?</title><description>&lt;a href="http://www.mems-exchange.org/software/durus/"&gt;Durus&lt;/a&gt;,  the little python object db that could, seems to suddenly be getting two new storage backends. Jesus Cea &lt;a href="http://mail.mems-exchange.org/durusmail/durus-users/436/"&gt;announces&lt;/a&gt; that he is working on a BerkeleyDB storage backend, and Peter Wilkinson &lt;a href="http://mail.mems-exchange.org/durusmail/durus-users/437/"&gt;announces&lt;/a&gt; another one for SQLite.&lt;br /&gt;&lt;br /&gt;Both are motivated by the desire to Durus more usable for large data collections, such as start-up speed and impact on memory usage. And, both agree that working with the small and effective Durus code base is a joy...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-114241056341843073?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2006/03/new-storage-backends-for-durus.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-114215108446170640</guid><pubDate>Sun, 12 Mar 2006 07:42:00 +0000</pubDate><atom:updated>2006-03-12T09:17:40.916+01:00</atom:updated><title>Busiest site is powered by Quixote?</title><description>There was a flurry of activity last week on the &lt;a href="http://mail.mems-exchange.org/durusmail/quixote-users/"&gt;quixote-users&lt;/a&gt; mailing list. &lt;a href="http://www.mems-exchange.org/software/quixote/"&gt;Quixote&lt;/a&gt; is that other quiet Python Web Framework, that few people talk about but is well-thought out, simple, solid, and has been around for a long time. It's typically hype-shy users are extremely appreciative....&lt;br /&gt;&lt;br /&gt;Well there has been a lot of talk lately about Python Web Frameworks, with the new kids on the block, i.e. Django and TurboGears, getting all the attention. Of the arguments in their favour, at least for Django, is that they have been proven on high-traffic sites.&lt;br /&gt;&lt;br /&gt;Well, &lt;a href="http://mail.mems-exchange.org/durusmail/quixote-users/5418/"&gt;Bo Yang thinks&lt;/a&gt; that possibly his Quixote-powered site, &lt;a href="http://douban.com/"&gt;douban.com&lt;/a&gt;, is busier than any Django, TurboGears or even RoR site in the world, getting about 450,000 page views a day, all dynamically generated by Quixote. Oh, and if your chinese is not so good, there is an english version at &lt;a href="http://douban.net/"&gt;douban.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Scalability issues? It is all running on just one machine! Quoting Bo Yang from further down the email thread:  "&lt;a href="http://douban.com/"&gt;douban.com&lt;/a&gt; is currently running on a $1,500 home-made 1U server with an AMD athlon 64 dual core cpu, and SATA drives. It is hosted in Beijing. lighttpd, quixote, memcached, mysql are all running on one machine."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-114215108446170640?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2006/03/busiest-site-is-powered-by-quixote.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-23160166.post-114112998572194915</guid><pubDate>Tue, 28 Feb 2006 12:23:00 +0000</pubDate><atom:updated>2006-03-06T07:47:02.360+01:00</atom:updated><title>Compound specs, and error messages</title><description>&lt;span style="font-family:verdana;"&gt;The wonderfully simple and powerful &lt;span style="font-style: italic;"&gt;spec&lt;/span&gt; module, that comes with the &lt;a href="http://www.mems-exchange.org/software/qp/"&gt;QP Web Application Framework&lt;/a&gt;, allows you to build arbitrarily compound specifications against which you can check &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;attribute &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;values, or whole objects even. Btw, I have just realised that David Binger has actually just &lt;a href="http://holdenweb.blogspot.com/2006/02/lightning-talks-1.html"&gt;given a lightning talk&lt;/a&gt; &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;over the weekend &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;at &lt;a href="http://us.pycon.org/TX2006/"&gt;PyCon 2006&lt;/a&gt; about it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Spec&lt;/span&gt; offers a generous range of basic specs, such as &lt;span style="font-style: italic;"&gt;string&lt;/span&gt; (str or unicode), &lt;span style="font-style: italic;"&gt;pattern&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;instance&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;sequence&lt;/span&gt;, and so on. All very useful. It also offers what it calls &lt;span style="font-style: italic;"&gt;ConnectiveSpecOperators&lt;/span&gt;, that are basically compound specs, examples being &lt;span style="font-style: italic;"&gt;no&lt;/span&gt; (must not match any), &lt;span style="font-style: italic;"&gt;both&lt;/span&gt; (must match all), and &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;either&lt;/span&gt; (must match any)&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;. As a side note, the names&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; &lt;span style="font-style: italic;"&gt;both&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;either&lt;/span&gt; are used instead of&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; &lt;span style="font-style: italic;"&gt;all&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; to avoid nameclashing with python 2.5 same-name builtins.&lt;br /&gt;&lt;br /&gt;One little problem with these compound specs, though, is that you do not know which of the sub-specs caused them to fail, or to succeed for that matter. It would be nice if the first sub-spec instance that caused the match or the failure be  somehow bubbled up to the root spec, that can then be queried for by client code if desired, and using that information for example to provide more appropriate error messages to the trying-to-not-get-annoyed-with-technology end user.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/23160166-114112998572194915?l=gizmoweblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://gizmoweblog.blogspot.com/2006/02/compound-specs-and-error-messages.html</link><author>noreply@blogger.com (mario ruggier)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>