empty classes as c structs?

Carlos Ribeiro carribeiro at gmail.com
Tue Feb 8 07:34:35 EST 2005


On Tue, 8 Feb 2005 12:01:23 +0100, Alex Martelli <aleaxit at yahoo.com> wrote:
> Nick Coghlan <ncoghlan at iinet.net.au> wrote:
> 
> > > We could use __add__, instead for combining namespaces
> >
> > Update already let's us combine namespaces. To create a new object that merges
> > two namespaces do:
> >    namespace.update(namespace(ns_1), ns_2)
> 
> One thing I'd like to see in namespaces is _chaining_ -- keeping each
> namespace separate but having lookups proceed along the chain.  (The
> best semantics for _bindings_ as opposed to lookups isn't clear though).

Good point. The name 'namespace' kind of imples chaining, in the usual
Pythonic sense... But I feel that by splitting this into two types
(namespace & bunch) we may be making things overly complicated, and
losing some of the power of the argument. Again, just my $0.02 worth.

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com



More information about the Python-list mailing list