| 283 | # to pack as integers. That is assuming the implemented |
| 284 | # '__index__' method returns an 'int'. |
| 285 | class Indexable(object): |
| 286 | def __init__(self, value): |
| 287 | self._value = value |
| 288 | |
| 289 | def __index__(self): |
| 290 | return self._value |
| 291 | |
| 292 | # If the '__index__' method raises a type error, then |
| 293 | # '__int__' should be used with a deprecation warning. |