Issue1305

classification
Title: Confusing error message calling generator.next() with arguments
Type: behaviour Severity: minor
Components: Core Versions: Jython 2.7, Jython 2.5
Milestone:
process
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, nriley, pjenvey, zyasoft
Priority: low Keywords:

Created on 2009-04-07.15:20:19 by nriley, last changed 2014-06-18.19:37:35 by zyasoft.

Messages
msg4463 (view) Author: Nicholas Riley (nriley) Date: 2009-04-07.15:20:18
def gen():
    yield True

gen().next(1)

On CPython this gives "TypeError: expected 0 arguments, got 1".

On Jython, this gives "TypeError: next() takes exactly one argument (1 given)"

Note that this works fine with iterators, where Jython produces "TypeError: next(): 
expected 0 args; got 1".
msg4471 (view) Author: Philip Jenvey (pjenvey) Date: 2009-04-07.19:35:31
I remember seeing this before, it's a bug with in the error handling by 
the exposed method handle. I think it's including self in the count
msg8515 (view) Author: Jim Baker (zyasoft) Date: 2014-05-22.00:09:02
Should fix for beta 4
History
Date User Action Args
2014-06-18 19:37:35zyasoftsetpriority: low
2014-05-22 00:09:02zyasoftsetresolution: accepted
messages: + msg8515
nosy: + zyasoft
2013-02-19 18:21:41fwierzbickisetversions: + Jython 2.5, Jython 2.7
2009-08-09 02:37:26fwierzbickisetnosy: + fwierzbicki
2009-04-07 19:35:31pjenveysetnosy: + pjenvey
messages: + msg4471
2009-04-07 15:20:19nrileycreate