Changeset 921:11f9fb4fb178 for src/mlx/xplane.py
- Timestamp:
- 04/27/19 12:06:32 (5 years ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/xplane.py
r919 r921 12 12 import codecs 13 13 import math 14 from functools import total_ordering 14 15 15 16 from xplra import XPlane, MultiGetter, MultiSetter, ProtocolException … … 148 149 return True 149 150 151 @total_ordering 150 152 class PeriodicRequest(object): 151 153 """A periodic request.""" … … 198 200 pass 199 201 200 def __cmp__(self, other): 201 """Compare two periodic requests. They are ordered by their next 202 firing times.""" 203 return cmp(self._nextFire, other._nextFire) 202 def __eq__(self, other): 203 """Equality comparison by the firing times""" 204 return self._nextFire == other._nextFire 205 206 def __ne__(self, other): 207 """Non-equality comparison by the firing times""" 208 return self._nextFire != other._nextFire 209 210 def __lt__(self, other): 211 """Less-than comparison by the firing times""" 212 return self._nextFire < other._nextFire 204 213 205 214 class PeriodicDataRequest(PeriodicRequest):
Note:
See TracChangeset
for help on using the changeset viewer.