list of properties
Emile van Sebille
emile at fenx.com
Thu Feb 16 13:02:38 EST 2012
More information about the Python-list mailing list
Thu Feb 16 13:02:38 EST 2012
- Previous message (by thread): list of properties
- Next message (by thread): Undoing character read from file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2/16/2012 9:19 AM Emmanuel Mayssat said... > Hello, > > Is there a way to list 'properties' ? dir(thingy) > > > from PyQt4.QtCore import * > > class LObject(QObject): > def __init__(self, parent=None): > super(LObject, self).__init__(parent) > self.arg1 = 'toto' > > def getArg2(self): > return self.arg1 + " <--" > arg2 = property(getArg2) > > l = LObject() > print l.__dict__ > > returns only arg1 arg2 is defined at the class level and not the instance level. l.__dict__ returned the instance attributes. Look in LObject.__dict__ for arg2. Emile > > > How can I find that arg2 is a 'virtual' attribute (i.e. property)? > > Regards, > -- > E > >
- Previous message (by thread): list of properties
- Next message (by thread): Undoing character read from file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list