Python bindings naming issues

Hi folks, 'NotImplemented' [0] and 'NotImplementedError' [1] are reserved keywords in Python. Thus, the SAGA 'NotImplemented' Exception has the potential to hide some of these keywords in the Python bindings. So we could either rename the exception or live with the fact that there might be some (small?) problems. What do you think? Similarly, 'id', which is used as parameter in many methods in the SAGA spec, is a built-in function in Python. This, however, shouldn't be to much of an issue to rename. Cheers, /Manuel [0] http://docs.python.org/library/constants.html#NotImplemented [1] http://docs.python.org/library/exceptions.html#exceptions.NotImplementedErro... [2] http://docs.python.org/library/functions.html#id

Quoting [Manuel Franceschini] (Jan 12 2010):
Hi folks,
'NotImplemented' [0] and 'NotImplementedError' [1] are reserved keywords in Python.
The first link seems to indicate that Python's NotImplemented is only thrown on __eq__(), __lt__() etc - which (a) don't look like heavily used functions (in userspace), and (b) seem to be cleanly distinguishable from SAGA calls. So, is this really a collision? If so, then one could use something liks IsNotImplemented?
Thus, the SAGA 'NotImplemented' Exception has the potential to hide some of these keywords in the Python bindings. So we could either rename the exception or live with the fact that there might be some (small?) problems. What do you think?
Similarly, 'id', which is used as parameter in many methods in the SAGA spec, is a built-in function in Python. This, however, shouldn't be to much of an issue to rename.
Right. Well, naming is always painful, isn't it? Best, Andre.
Cheers, /Manuel
[0] http://docs.python.org/library/constants.html#NotImplemented [1] http://docs.python.org/library/exceptions.html#exceptions.NotImplementedErro... [2] http://docs.python.org/library/functions.html#id -- Nothing is ever easy.
participants (2)
-
Andre Merzky
-
Manuel Franceschini