[IPython-dev] IPython1 API design question
Sat Feb 9 17:57:28 CST 2008
> what about an approach where you extract the reserved keywords manually?
> something like
We seriously considered this option, but rejected it for two reasons
1. IPython1 is heavily based on interfaces (as in zope.interface).
Using this trick sort of makes all your interfaces to vague to be
2. In most of the cases we were using **kwargs, there is nothing to
prevent the user from trying to use keyword arguments for their own
purposes. That is we could never know if block/targets should be
interpreted as internal ipython keyword arguments or ones that should
simply be passed on. This would lead to confusing wierd bugs.
> def push(self,**kargs):
> ns = kargs.copy()
> block = ns.pop('block', False)
> targest = ns.pop('targets', 'all')
More information about the IPython-dev