I have the following program.
I am trying to have index the attributes of an object using __getitem__.
Reading them this way works great, but assigning them a value doesn't
Is there a way to do such a thing?
(Almost like a named tuple, but with custom methods)
class LIter(object):
def __init__
Hello all,
I would like to instantiate my class as follow
QObject(, )
QObject()
an example would be
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qmenu.html
How can I do this without have to specify parent= in the second
version
(I always need to supply the parent parameter, but I
Yes, exactly like range
http://coverage.livinglogic.de/Demo/classes/Range.py.html
see handleargs function. Well that's short, but that's still too much code
for what I want to do ;-)
On Thu, Feb 2, 2012 at 7:43 PM, Terry Reedy wrote:
> On 2/2/2012 8:09 PM, Emmanuel
Hello,
Is there a way to list 'properties' ?
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