[Chicago] Inline modules declarations? [tangent off of "Fw: using CruiseControl for non-java projects?"]

Ian Bicking ianb at colorstudy.com
Mon Oct 9 21:23:20 CEST 2006

Jason R Huggins wrote:
> build:
>     - clean:
>     - checkout:
>     - test:
>     - communicate:
> Second problem... because 99% of the time, modules are real folders and 
> files on the filesystem, each needs to be named uniquely. So this wouldn't 
> be possible:
> html:
>     body:
>         div:
>       div:
> But this would:
> html:
>     body:
>         with div():
>             <div stuff>
>         with div():
>             <more div stuff>

I think both these are discussed in the PEP.  One proposed solution was 
to allow the being-maked object (Builder in my example) to provide a 
custom dictionary type.  A custom dictionary type could keep track of 
order and duplicate keys.  This also makes "make" a bit more different 
from "class", since classes have real-actual-dictionaries built into 
them at a pretty low level; you can't just put a dictionary-like-object 
into .__dict__, after all.  But because "make" has a lot less semantics 
associated with it -- it's just a syntactic construct -- it's not a big 
deal to start passing not-quite-dicts to a custom class like Builder.

Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org

More information about the Chicago mailing list