M
Mirko Zeibig
Hello everybody,
I recently stumbled across the proposal of removing `callable` in Python
3000 (http://python.org/peps/pep-3000.html) catching an exception
instead, maybe something like this:
--- snip ---
[mize@lxmize mize]$ python2.3
Python 2.3.3 (#1, Apr 6 2004, 01:47:39)
[GCC 3.3.3 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
--- snap ---
This is not an option for e.g. IDEs as some functions might actually do
something when called ;-) and I like `callable` for introspection.
Other ways would be to check for the `__call__` attribute or use several
methods of the `inspect`-Module, both of which are not better than
`callable` IMHO.
Regards
Mirko
I recently stumbled across the proposal of removing `callable` in Python
3000 (http://python.org/peps/pep-3000.html) catching an exception
instead, maybe something like this:
--- snip ---
[mize@lxmize mize]$ python2.3
Python 2.3.3 (#1, Apr 6 2004, 01:47:39)
[GCC 3.3.3 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
--- snap ---
This is not an option for e.g. IDEs as some functions might actually do
something when called ;-) and I like `callable` for introspection.
Other ways would be to check for the `__call__` attribute or use several
methods of the `inspect`-Module, both of which are not better than
`callable` IMHO.
Regards
Mirko