View Single Post
Old 03-09-2011, 08:37 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,451
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Those attributes are class-level, so you don't need to instantiate the class to see them. All you need is a handle to the class. For example, the following program works:
Code:
class Foo(object):

    dont = frozenset(['toolbar-device', 'context-menu-device'])
    
    def bar(self):
        pass

print Foo.dont
If the class Foo were in a separate file, then importing the class is sufficient.
chaley is offline   Reply With Quote