This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients
Date 2005-02-16.22:21:02
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=593130

Functions coded in C generally do not take keyword 
arguments.  (Special coding is required to achieve 
otherwise.)  In 2.2, range and xrange both followed this rule:

>>> xrange(1,20,step=2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: xrange() takes no keyword arguments

>>> range(1,20,step=2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: range() takes no keyword arguments

So, removal of the error message by 2.4 seem to be a bug.

Surprise:
>>> str(object=1)
'1'
>>> str(i=2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: 'i' is an invalid keyword argument for this function

There is nothing in the doc(Lib Ref) or doc string of str vs. 
range and xrange that would lead me to expect this.

I looked around CVS a bit to see if the past or possible future 
change was something simple, but I could not find source of 
error message in bltinmodule.c, ceval.c, getargs.c,  
rangeobject.c, or typeobject.c, so I will leave this to 
someone else.
History
Date User Action Args
2007-08-23 14:29:25adminlinkissue1119418 messages
2007-08-23 14:29:25admincreate