@@ -220,34 +220,31 @@ cdef class IndexEngine:
220
220
def __sizeof__ (self ):
221
221
return self .sizeof()
222
222
223
- property is_unique :
223
+ @property
224
+ def is_unique (self ):
225
+ if self .need_unique_check:
226
+ self ._do_unique_check()
224
227
225
- def __get__ (self ):
226
- if self .need_unique_check:
227
- self ._do_unique_check()
228
-
229
- return self .unique == 1
228
+ return self .unique == 1
230
229
231
230
cdef inline _do_unique_check(self ):
232
231
233
232
# this de-facto the same
234
233
self ._ensure_mapping_populated()
235
234
236
- property is_monotonic_increasing :
237
-
238
- def __get__ (self ):
239
- if self .need_monotonic_check:
240
- self ._do_monotonic_check()
235
+ @property
236
+ def is_monotonic_increasing (self ):
237
+ if self .need_monotonic_check:
238
+ self ._do_monotonic_check()
241
239
242
- return self .monotonic_inc == 1
240
+ return self .monotonic_inc == 1
243
241
244
- property is_monotonic_decreasing :
242
+ @property
243
+ def is_monotonic_decreasing (self ):
244
+ if self .need_monotonic_check:
245
+ self ._do_monotonic_check()
245
246
246
- def __get__ (self ):
247
- if self .need_monotonic_check:
248
- self ._do_monotonic_check()
249
-
250
- return self .monotonic_dec == 1
247
+ return self .monotonic_dec == 1
251
248
252
249
cdef inline _do_monotonic_check(self ):
253
250
cdef object is_unique
@@ -279,10 +276,9 @@ cdef class IndexEngine:
279
276
cdef _check_type(self , object val):
280
277
hash (val)
281
278
282
- property is_mapping_populated :
283
-
284
- def __get__ (self ):
285
- return self .mapping is not None
279
+ @property
280
+ def is_mapping_populated (self ):
281
+ return self .mapping is not None
286
282
287
283
cdef inline _ensure_mapping_populated(self ):
288
284
# this populates the mapping
0 commit comments