class-attribute

Why can't I access the instance.__class__ attribute in Python?

I'm new to Python, and I know I must be missing something pretty simple, but why doesn't this very, very simple code work? class myClass: pass testObject = myClass print testObject.__class__ I get the following error: AttributeError: class myClass has no attribute '__class__' Doesn't every object in Python have a __class__ att...

How can I apply one or more attributes to all classes in a project?

Hi How can I apply an attribute to all classes in a particular project?! And is it enough to apply CLSCompliant attribute to just one class or do I have to apply to all classes? Thanks for your answers... ...