tests/cpydiff: Update subclassing Exception case and give work-around.
This commit is contained in:
parent
c78ef92d78
commit
e4e3f0d727
|
@ -1,8 +1,12 @@
|
||||||
"""
|
"""
|
||||||
categories: Types,Exception
|
categories: Types,Exception
|
||||||
description: Exception.__init__ raises TypeError if overridden and called by subclass
|
description: Exception.__init__ method does not exist.
|
||||||
cause: Unknown
|
cause: Subclassing native classes is not fully supported in MicroPython.
|
||||||
workaround: Unknown
|
workaround: Call using ``super()`` instead::
|
||||||
|
|
||||||
|
class A(Exception):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
"""
|
"""
|
||||||
class A(Exception):
|
class A(Exception):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in New Issue