Re: class level properties

2008-04-13 Thread Charles D Hixson
Peter Otten wrote: > Charles D Hixson wrote: > > >> I want a hundred or so read-only variables, and I'm not sure the best >> way to achieve it. >> > > What do you really want to do? I recommend that you forget about bondage and > rely upon displin

Re: class level properties

2008-04-12 Thread Charles D Hixson
Arnaud Delobelle wrote: > On Apr 12, 8:36 pm, Charles D Hixson <[EMAIL PROTECTED]> > wrote: > >> I'm trying to construct read-only variables at the class level. I've >> been unsuccessful. Any suggestions? >> >> Mixing @classmethod and @pr

class level properties

2008-04-12 Thread Charles D Hixson
I'm trying to construct read-only variables at the class level. I've been unsuccessful. Any suggestions? Mixing @classmethod and @property doesn't appear to produce workable code. Ditto for mixing @classmethod and __getattr__. (The property approach compiles, but execution says that you can

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-25 Thread Charles D Hixson
Toby wrote: > Charles D Hixson wrote: > >> a class whose sub-classes automatically have unique class variables of >> a determined form such that I can do a hierarchical search through them >> > > Something like this? > (scroll down to see the results

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-24 Thread Charles D Hixson
Toby wrote: > Charles D Hixson wrote: > >> What I basically want is a kind of class that has both class and >> instance level dict variables, such that descendant classes >> automatically create their own class and instance level dict variables. >> The id

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-23 Thread Charles D Hixson
Larry Bates wrote: > Charles D Hixson wrote: > >> I'm sure I've read before about how to construct prototypes in Python, >> but I haven't been able to track it down (or figure it out). >> >> What I basically want is a kind of class that has both cla

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-23 Thread Charles D Hixson
Gabriel Genellina wrote: >> En Fri, 23 Feb 2007 17:53:59 -0300, Charles D Hixson >> <[EMAIL PROTECTED]> escribió: >> >> >>> I'm sure I've read before about how to construct prototypes in Python, >>> but I haven't been able to track

How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-23 Thread Charles D Hixson
I'm sure I've read before about how to construct prototypes in Python, but I haven't been able to track it down (or figure it out). What I basically want is a kind of class that has both class and instance level dict variables, such that descendant classes automatically create their own class a

Iterators: Would "rewind" be a good idea?

2006-05-21 Thread Charles D Hixson
I was reading through old messages in the list and came up against an idea that I thought might be of some value: "Wouldn't it be a good idea if one could "rewind" an iterator?" Not stated in precisely those terms, perhaps, but that's the way I read it. I appreciate that one could use a sequence r