回答編集履歴

1

追記

2019/09/22 08:11

投稿

LouiS0616
LouiS0616

スコア35660

test CHANGED
@@ -58,6 +58,22 @@
58
58
 
59
59
  実際にはゲッター以上にカスタマイズができるので、用途はもっと広いです。
60
60
 
61
+ ```Python
62
+
63
+ class MyList:
64
+
65
+ ...
66
+
67
+
68
+
69
+ @property
70
+
71
+ def 最後の要素(self):
72
+
73
+ return self._data[self.length - 1]
74
+
75
+ ```
76
+
61
77
 
62
78
 
63
79
  ---