On Apr 11, 12:54 pm, Steven D'Aprano wrote:
> Ah, now it is more clear.
>
> Okay, let's try this:
>
> >>> class C(object):
>
> ... def __getattr__(self, name):
> ... # Only called if self.name doesn't exist.
> ... inst = self.__class__()
> ... setattr(self,
On Sat, 11 Apr 2009 03:01:48 -0700, Edd wrote:
> Yes I probably mean instance attributes. Forgive me, I am not
> particularly sure of the terminology. But your MyClass example, won't
> quite do what I want, as I'd like to be able to define instance
> attributes on top of instance attributes by ass
Hi Steven,
Thank you for your response!
On Apr 11, 4:22 am, Steven D'Aprano wrote:
> On Fri, 10 Apr 2009 19:04:38 -0700, Edd wrote:
> > Hi folks,
>
> > I'd like to use Python itself as the configuration language for my
> > Python application. I'd like the user to be able to write something like
On Apr 11, 1:22 pm, Steven D'Aprano wrote:
> Is "pants" slang for "fragile, hard to understand and difficult to debug"?
pommy slang for "sucks intensely, like the Deathstar's tractor
beam" ... I think we agree with him.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 10 Apr 2009 19:04:38 -0700, Edd wrote:
> Hi folks,
>
> I'd like to use Python itself as the configuration language for my
> Python application. I'd like the user to be able to write something like
> this in their config file(s):
>
>cfg.laser.on = True
>cfg.laser.colour = 'blue'
>
Hi folks,
I'd like to use Python itself as the configuration language for my
Python application. I'd like the user to be able to write something
like this in their config file(s):
cfg.laser.on = True
cfg.laser.colour = 'blue'
cfg.discombobulated.vegetables = ['carrots', 'broccoli']
#