[Python-Dev] Re: PEP 282 comments

Jeremy Hylton jeremy@zope.com
Thu, 21 Mar 2002 19:17:27 -0500


>>>>> "TM" == Trent Mick <trentm@ActiveState.com> writes:

  TM> [Jeremy Hylton wrote]
  >> Why do you need **kwargs at all?  Can't the interface specify the
  >> complete set of optional arguments explicitly?

  TM> If, as I said, we want to keep the '*args' argument, how do we
  TM> explicitly specify an 'exc_info' argument?

  TM>     def info(self, msg, *args, exc_info=None):
  TM>                                       ^------- SyntaxError

>>> def info(self, msg, exc_info=None, *args):
...     return msg, exc_info, args
...
>>> info(1, 2, 3, 4, 5)
(2, 3, (4, 5))

Jeremy