Message6559

Author sbruno
Recipients sbruno
Date 2011-06-22.20:14:20
SpamBayes Score 1.0674794e-12
Marked as misclassified No
Message-id <1308773660.9.0.927132789856.issue1763@psf.upfronthosting.co.za>
In-reply-to
Content
Issue title was: join() Message on a TypeError is incorrect
Actually it looks like a problem with all the string methods, the message seems to be counting the implicit self argument.

jython:
>>> "a".upper(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: upper() takes exactly one argument (1 given)

python:
>>> "a".upper(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: upper() takes no arguments (1 given)



jython:
>>> "a".split(",",1,2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: split() takes 1-3 arguments (3 given)

python:
>>> "a".split(",",1,2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: split() takes at most 2 arguments (3 given)



jython:
>>> "a".replace("a","b",1,1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: replace() takes 3-4 arguments (4 given)

python:
>>> "a".replace("a","b",1,1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: replace() takes at most 3 arguments (4 given)
History
Date User Action Args
2011-06-22 20:14:20sbrunosetmessageid: <1308773660.9.0.927132789856.issue1763@psf.upfronthosting.co.za>
2011-06-22 20:14:20sbrunosetrecipients: + sbruno
2011-06-22 20:14:20sbrunolinkissue1763 messages
2011-06-22 20:14:20sbrunocreate