From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89593 invoked by alias); 21 Jul 2016 18:06:16 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 89582 invoked by uid 89); 21 Jul 2016 18:06:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=disregard, H*r:Unknown, paul_koningdellcom, sk:Paul_Ko X-HELO: esa5.dell-outbound.iphmx.com Received: from Unknown (HELO esa5.dell-outbound.iphmx.com) (68.232.153.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Jul 2016 18:06:05 +0000 Received: from ausxippc110.us.dell.com ([143.166.85.200]) by esa5.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2016 23:05:57 +0500 X-LoopCount0: from 10.175.216.249 From: To: CC: Subject: Re: Python gdb.Function is an old-style class? Date: Thu, 21 Jul 2016 18:06:00 -0000 Message-ID: References: <1469121732.5880.128.camel@gnu.org> <442ECA9F-4670-4B4A-8172-8AA7418EF332@dell.com> In-Reply-To: <442ECA9F-4670-4B4A-8172-8AA7418EF332@dell.com> Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00016.txt.bz2 > On Jul 21, 2016, at 1:38 PM, Paul Koning wrote: >=20 >=20 >> On Jul 21, 2016, at 1:22 PM, Paul Smith wrote: >>=20 >> Hi all; I am writing some Python functions that subclass from >> gdb.Function, and I use super() to call the superclass __init__() >>=20 >> It works, but pylint is failing with an error "Use of super on an old >> style class". This is usually shown when a Python2 class does not >> inherit, ultimately, from the object. >>=20 >> Is there something magic that needs to happen to make gdb.Function >> recognized as a new-style class? >=20 > You could just call gdb.Function.__init__(self) explicitly rather than th= e syntactic sugar of super().=20 I just tried the example shown in the manual, and it runs without errors. = I don't get the error message you quoted, and the resulting function works = correctly. So disregard my previous comment about subclassing. Sorry about the confus= ion. paul