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