Re: Why do descriptors (and thus properties) only work on attributes.

From: Steve Holden (steve_at_holdenweb.com)
Date: 03/01/05


Date: Tue, 01 Mar 2005 05:09:04 -0500

Steven Bethard wrote:
> Antoon Pardon wrote:
>
>> Can anyone explain why descriptors only work when they are an attribute
>> to an object or class. I think a lot of interesting things one can
>> do with descriptors would be just as interesting if the object stood
>> on itself instead of being an attribute to an other object.
>
>
> Not sure what "stood on itself" really means, but if you just want to be
> able to have module-level properties, you can do something like:
>
Think in non-English (stand outside yourself?) for a second, rememberinf
Antoon is Belgian (if you knew that):

    "on" => "by"

    "stood on itself" => "stood by itself"
                      => "standalone"

regards
  Steve



Relevant Pages