File tree Expand file tree Collapse file tree 1 file changed +26
-11
lines changed
graalpython/com.oracle.graal.python.annotations/src/com/oracle/graal/python/annotations Expand file tree Collapse file tree 1 file changed +26
-11
lines changed Original file line number Diff line number Diff line change 91
91
String raiseErrorName () default "" ;
92
92
}
93
93
94
+ /** See <a href="https://docs.python.org/3/c-api/typeobj.html">slot documentation</a> */
94
95
enum SlotKind {
95
- nb_bool ,
96
- nb_add ,
97
- sq_length ,
98
- sq_item ,
99
- sq_concat ,
100
- mp_length ,
101
- mp_subscript ,
102
- tp_descr_get ,
103
- tp_descr_set ,
104
- tp_getattro ,
105
- tp_setattro ,
96
+ /** Whether this object is treated as true or false for {@code if object} */
97
+ nb_bool ("__bool__" ),
98
+ /** foo + bar */
99
+ nb_add ("__add__, __radd__" ),
100
+ /** sequence length/size */
101
+ sq_length ("__len__" ),
102
+ /** sequence item: read element at index */
103
+ sq_item ("__getitem__" ),
104
+ /** seq + seq, nb_add is tried before */
105
+ sq_concat ("__add__" ),
106
+ /** mapping length */
107
+ mp_length ("__len__" ),
108
+ /** mapping subscript, e.g. o[key], o[i:j] */
109
+ mp_subscript ("__getitem__" ),
110
+ /** type descriptor get */
111
+ tp_descr_get ("__get__" ),
112
+ /** type descriptor set/delete */
113
+ tp_descr_set ("__set__, __delete__" ),
114
+ /** get object attribute */
115
+ tp_getattro ("__getattribute__, __getattr__" ),
116
+ /** set/delete object attribute */
117
+ tp_setattro ("__setattr__, __delattr__" );
118
+
119
+ SlotKind (@ SuppressWarnings ("unused" ) String specialMethods ) {
120
+ }
106
121
}
107
122
}
You can’t perform that action at this time.
0 commit comments