From b3d8fec066285c831b69fd77c092f1cc70e38882 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Mon, 24 Aug 2020 00:00:12 +0200 Subject: [PATCH] Adapt code example in advanced/classes.rst to new handling of forgetting to call the superclass __init__ (#2429) --- docs/advanced/classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced/classes.rst b/docs/advanced/classes.rst index f7db3eadf..f4efc68f8 100644 --- a/docs/advanced/classes.rst +++ b/docs/advanced/classes.rst @@ -159,7 +159,7 @@ Here is an example: class Dachshund(Dog): def __init__(self, name): - Dog.__init__(self) # Without this, undefined behavior may occur if the C++ portions are referenced. + Dog.__init__(self) # Without this, a TypeError is raised. self.name = name def bark(self): return "yap!"