Skip to content

Commit e4e3f0d

Browse files
committed
tests/cpydiff: Update subclassing Exception case and give work-around.
1 parent c78ef92 commit e4e3f0d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/cpydiff/types_exception_subclassinit.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
"""
22
categories: Types,Exception
3-
description: Exception.__init__ raises TypeError if overridden and called by subclass
4-
cause: Unknown
5-
workaround: Unknown
3+
description: Exception.__init__ method does not exist.
4+
cause: Subclassing native classes is not fully supported in MicroPython.
5+
workaround: Call using ``super()`` instead::
6+
7+
class A(Exception):
8+
def __init__(self):
9+
super().__init__()
610
"""
711
class A(Exception):
812
def __init__(self):

0 commit comments

Comments
 (0)