Pipe in the "return" statement

Archard Lias archardlias at googlemail.com
Mon Jul 25 11:28:01 EDT 2011


On Jul 25, 2:33 pm, Christian Heimes <li... at cheimes.de> wrote:
> Am 25.07.2011 14:00, schrieb Archard Lias:
>
> > def flags(self, index):
> >     if not index.isValid():
> >         return Qt.ItemIsEnabled
>
> >     return super(self.__class__, self).flags(index) |
>
> Your use of super() is incorrect and will not work as you might expect.
> You *must* use the class here, never self.__class__.
>
> Christian

It would be great if you could elaborate a little more on that. Am I
not supposed to access the parent here?

--
Archard



More information about the Python-list mailing list