forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
CircuitPython version
Adafruit CircuitPython 8.2.4 on 2023-08-22; Adafruit Feather ESP32-S2 TFT with ESP32S2
Board ID:adafruit_feather_esp32s2_tft
UID:487F305FFE63Code/REPL
class SimpleClass:
def __init__(
self,
param1: int,
param2: str,
):
self.param1 = param1
self.param2 = param2
@property
def property1(self):
print(dir(self)) # <-- This is the line that causes the board to crash
return (self.param1, self.param2)
def some_func(self):
print(dir(self)) # <-- This is the line that causes the board to crash
input("Press Enter to start...")
simple_object = SimpleClass(1, "2")
# print(dir(simple_object)) # <-- If dir() called outside, no crash
simple_object.property1
simple_object.some_func()Behavior
Board crashed every time it reaches the dir(self), no output, simply the sound of USB device disconnected and then after a few secodns connected again
Description
- if the
dir()is inside a property or a method, it crashes the board - if the
dir()is called outside a class, it works as expected - in CPython it works as expected
Additional information
No response