Access the class type when constructing a class attribute in python?
<p>I'd like to do this:</p>

<pre><code>class MyThing(object):
    def __init__(self,owning_cls):
        self.owning_cls = owning_cls

class MyClass(object):
    thing = MyThing(self.__class__)

print MyClass.thing.owning_cls
</code></pre>

<p>This doesn't work - as there isn't a self to refer to in the class construction of MyClass.</p>

<p>Is there any way to achieve this (it's clearly trivial if we make thing an instance attribute, but I'd like to be a class attribute please!)?</p>
