[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Developers] Is it possible to rename BooleanDetector.{and,or,not} to not collide with Python keywords?
Hi Glenn,
Glenn Ehrlich <Glenn.Ehrlich@kinetx.com> a écrit :
All,
Thanks to some great advice I receoved on the user’s list last week,
I looked into the new BooleanDetector class. I built a python
wrapper with it but I can’t use the class from the python wrapper
because ‘and’, ‘or’, and ‘not’ are reserved keywords in python, so
those can’t be method names in python.
I forked the repo and changed them to ‘and_operator’, ‘or_operator’,
‘not_operator’ (and changed the unit tests) and it works correctly
from the python wrapper.
Is it possible to make a change like this before the next official release?
Sure, I he done it in git repo.
I’m not attached to the names ‘and_operator’, ‘or_operator’,
‘not_operator’. They can be whatever as long as it’s not and, or,
not. Maybe ‘and_combinator’, etc, since it’s combining two
EventDetectors.
I used andCombine, orCombine and notCombine for the methods names.
best regards,
Luc
Glenn Ehrlich
KinetX Aerospace