Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10266

Re: Pipe in the "return" statement

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:" ': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; '*must*': 0.16; 'def': 0.16; 'header:In-Reply-To:1': 0.22; 'incorrect': 0.23; 'class': 0.31; 'to:addr:python-list': 0.34; 'header:X -Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'here,': 0.35; 'received:org': 0.38; 'subject:: ': 0.38; 'header:Mime- Version:1': 0.39; 'skip:s 20': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'your': 0.60; 'schrieb': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Christian Heimes <lists@cheimes.de>
Subject Re: Pipe in the "return" statement
Date Mon, 25 Jul 2011 14:33:19 +0200
References <acaab166-32c1-43df-b1a4-e3b47c62be36@m10g2000yqd.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host smtp.semantics.de
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2.102ipre2 Thunderbird/3.1.11
In-Reply-To <acaab166-32c1-43df-b1a4-e3b47c62be36@m10g2000yqd.googlegroups.com>
X-Enigmail-Version 1.1.2
OpenPGP id=AD16AB1B; url=http://cheimes.de/heimes.asc
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1453.1311597213.1164.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1311597213 news.xs4all.nl 23888 [2001:888:2000:d::a6]:53411
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10266

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 05:00 -0700
  Re: Pipe in the "return" statement Ian Collins <ian-news@hotmail.com> - 2011-07-26 00:03 +1200
    Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 07:16 -0700
      Re: Pipe in the "return" statement Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9af6@myhashismyemail.com> - 2011-07-25 10:31 -0400
        Re: Pipe in the "return" statement Ethan Furman <ethan@stoneleaf.us> - 2011-07-25 13:07 -0700
          Re: Pipe in the "return" statement Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-28 08:26 +0200
      Re: Pipe in the "return" statement Oliver Bestwalter <oliver@bestwalter.de> - 2011-07-25 16:35 +0200
        Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 08:05 -0700
      Re: Pipe in the "return" statement John Gordon <gordon@panix.com> - 2011-07-25 14:39 +0000
        Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 08:06 -0700
      Re: Pipe in the "return" statement gwowen <gwowen@gmail.com> - 2011-07-25 07:42 -0700
  Re: Pipe in the "return" statement Christian Heimes <lists@cheimes.de> - 2011-07-25 14:33 +0200
    Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 08:28 -0700
      Re: Pipe in the "return" statement Christian Heimes <lists@cheimes.de> - 2011-07-25 18:11 +0200
        Re: Pipe in the "return" statement Archard Lias <archardlias@googlemail.com> - 2011-07-25 09:30 -0700
  Re: Pipe in the "return" statement TonyO <guinness.tony@gmail.com> - 2011-07-25 05:52 -0700
    Re: Pipe in the "return" statement gwowen <gwowen@gmail.com> - 2011-07-25 06:00 -0700
    Re: Pipe in the "return" statement red floyd <redfloyd@gmail.com> - 2011-07-25 14:04 -0700
      reading  zipfile; problem using raw buffer "Sells, Fred" <fred.sells@adventistcare.org> - 2011-07-26 08:42 -0400
        Re: reading  zipfile; problem using raw buffer Billy Mays <81282ed9a88799d21e77957df2d84bd6514d9af6@myhashismyemail.com> - 2011-07-26 08:49 -0400
      Re: reading  zipfile; problem using raw buffer Peter Otten <__peter__@web.de> - 2011-07-26 15:04 +0200
      RE: reading  zipfile; problem using raw buffer "Sells, Fred" <fred.sells@adventistcare.org> - 2011-07-26 11:22 -0400

csiph-web