From 641a1711cf2fcd5a80dacfafbd973e7d5d713d14 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Tue, 7 Nov 2023 05:05:03 +0800 Subject: [PATCH] fix https://github.com/blueloveTH/pocketpy/issues/177 --- src/pocketpy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pocketpy.cpp b/src/pocketpy.cpp index 9a701a31..d434c5b4 100644 --- a/src/pocketpy.cpp +++ b/src/pocketpy.cpp @@ -1655,6 +1655,8 @@ void VM::post_init(){ bind_method<1>("property", "setter", [](VM* vm, ArgsView args) { Property& self = _CAST(Property&, args[0]); + // The setter's name is not necessary to be the same as the property's name + // However, for cpython compatibility, we recommend to use the same name self.setter = args[1]; return args[0]; });