Unexpected Inheritance Problem

Terry Reedy tjreedy at udel.edu
Thu May 20 17:02:10 EDT 2021


On 5/20/2021 2:53 PM, Grant Edwards wrote:
> On 2021-05-20, Mats Wichmann <mats at wichmann.us> wrote:
>> On 5/20/21 4:54 AM, Richard Damon wrote:
>>> On 5/20/21 3:24 AM, Peter Otten wrote:
>>>> On 20/05/2021 06:00, Richard Damon wrote:
>>>>
>>>>> class GedcomHead(Gedcom0Tag):
>>>>>        """GEDCOM 0 HEAD tag"""
>>>>>        def ___init___(self, *, parent):
>>>>
>>>> An __init__ with three underscores; you must me joking ;)
>>>>
>>> Yes, that is what I was missing, too many underscores there, so
>>> GedcomHead didn't have an __init__ so it inherited inherited from it
>>> from its base with the wrong signature.
>>
>> many fonts squish together repeated underscores in the display so it's
>> hard to see this visually,
> 
> Is it just me, or does it seem foolish to use such fonts for
> editing/browsing source code...

Windows 10, at least, has Source Code Pro, and variations, in which 
__init__ has distinct _s with a small space in between (unlike the 
default font here in Thunderbird, or in Firefox).  This is the only 
monospaced TrueType font available in the Windows console with this 
property.


-- 
Terry Jan Reedy




More information about the Python-list mailing list