Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Netscape is not a newsreader, and probably never shall be. -- Tom Christiansen


devel / comp.lang.python / Re: Unexpected Inheritance Problem

SubjectAuthor
o Re: Unexpected Inheritance ProblemChris Angelico

1
Re: Unexpected Inheritance Problem

<mailman.250.1621490335.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13190&group=comp.lang.python#13190

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: Unexpected Inheritance Problem
Date: Thu, 20 May 2021 15:58:42 +1000
Lines: 26
Message-ID: <mailman.250.1621490335.3087.python-list@python.org>
References: <be692bef-25da-3ac7-4158-45b78842218b@Damon-Family.org>
<CAPTjJmpYem9U6JjvAE98Pn2uJc_1XNnb8rk1O91KBfwAjZ7+Pw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de C2TW2fVPh/RNznig5KXKGQYrRMOhWai+drpgEPNjhJWQ==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=hN52yMVo;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'def': 0.04; 'damon': 0.09;
'typeerror:': 0.09; '(because': 0.16; '@classmethod': 0.16;
'arguments:': 0.16; 'chrisa': 0.16; 'classes,': 0.16;
'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16;
'received:209.85.166.42': 0.16; 'received:mail-
io1-f42.google.com': 0.16; 'using?': 0.16; 'wrote:': 0.16; 'thu,':
0.20; 'to:addr:python-list': 0.23; 'code': 0.24; 'error': 0.28;
'this.': 0.29; 'takes': 0.31; 'but': 0.31; 'expect': 0.31;
'to:name:python': 0.32; 'unexpected': 0.32; 'message-
id:@mail.gmail.com': 0.33; 'class': 0.33; 'received:209.85.166':
0.33; 'header:In-Reply-To:1': 0.33; 'received:google.com': 0.34;
'missing': 0.35; 'following': 0.35; 'from:addr:gmail.com': 0.35;
'received:209.85': 0.38; 'received:209': 0.38; 'required': 0.66;
'20,': 0.71; '2021': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=gqvNg/hUvuQhQdGRtlilAUMpA3izVL6oZXjDNoq3kI8=;
b=hN52yMVoZgpBUe8IIY1XXau9ftKCBqe9gNTGvypxVBlCQDNfbkPAmw+ISiquYbz09l
bueDMaVZ8rtMC+X7+Yn9woGt9/KwmBHSNBOuYMywaSP3BgUPvSukNH7Rw8PoV/X73ZNn
CF5Y9mOEn6UKYwYLguZg7R5WnFowZ7xjjYjhvr0/gUl17UhfQDj1ZH4QSl4se0FJxFuH
EeORUsju74YJGhCrUN/9kO5jKZD//C3e3z41lYqijsbTTiiSegLq+8offs2ox8j/cGzt
C9olrjQxsNqKvqTsXsU07hT59kHbLJnBeFdj7zyIyLtyDOpkbfaozdpbfZoj3tM7AfrZ
TqtQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=gqvNg/hUvuQhQdGRtlilAUMpA3izVL6oZXjDNoq3kI8=;
b=KLFzIaaRfXsPhE54TXtFea1kGk99ds4s8yAsJyLsc+jzDYZutq46aP10I7Coc1IbBs
Wl1+NhGlfEOOEWD0LeBazIaI47dv+5A+UUY36F5MUUIGaQliBXIKhyOm5zD1H3p192B5
xwRsns2D+oFZdE8gNfUhIAkOIdxxaIDikUdNk1pyKnEpqEjmnEuMnv1Qr/MP0a3CaH/6
Bj0Zk6avNcoZAFXMQa3Jxo+/B5LL8AtAuXCExtvUxyABCP2lZBkAB515cfA7umVYwqMk
riOX1ywmU0cdixzALZ/elbIaINi3i+hx9RFx65y1vsNTqSVnyNAMuREIjsqRp1BqRQI4
CoSA==
X-Gm-Message-State: AOAM532P7PTKRIIojdofIZ2LPKd9VDOUpUP+SIDfLDRYZRP6XbjKKVcO
Sb2UP88lNAz5eu0yB+7oRjZVajvbIxlJ1pjiiMg1ucG0+NK8rQ==
X-Google-Smtp-Source: ABdhPJwoZKmikKA/RbFlkMSomAy2DowG4qoU/hin6m4r94WTpxpW4JuMBi5ci/AG/umtWDg3q0YNdHCurm/txDUF33o=
X-Received: by 2002:a05:6638:b14:: with SMTP id
a20mr3942848jab.132.1621490333543;
Wed, 19 May 2021 22:58:53 -0700 (PDT)
In-Reply-To: <be692bef-25da-3ac7-4158-45b78842218b@Damon-Family.org>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://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: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmpYem9U6JjvAE98Pn2uJc_1XNnb8rk1O91KBfwAjZ7+Pw@mail.gmail.com>
X-Mailman-Original-References: <be692bef-25da-3ac7-4158-45b78842218b@Damon-Family.org>
 by: Chris Angelico - Thu, 20 May 2021 05:58 UTC

On Thu, May 20, 2021 at 2:02 PM Richard Damon <Richard@damon-family.org> wrote:
>
> Given the following definition of classes, I am getting an unexpected
> error of :
>
> TypeError: __init__() missing 2 required keyword-only arguments:
> 'idcode' and 'tag'
>
> On the call to create a GedcomHead in the call to GedcomHead() in
> Gedcom0Tag.add()
>
> class Gedcom0Tag(GedcomTag):
> """Represents a Level 0 Tag of a GEDCOM file"""
>
> @classmethod
> def add(cls, *, parent, tag: str, payload: str, level=0):
>
> Gedcom0Tag.add(parent, 'Head', '')
>

You're defining that add takes keyword-only args (because the asterisk
stops them from being passed positionally), but then you're calling it
with nothing but positional args. Is that the code you're using? I
would expect to see *three* missing kwonly args from this.

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor