Issue1820

classification
Title: Can't decorate a function in interactive interpreter
Type: behaviour Severity: normal
Components: None Versions: 2.5.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Ghuff, amak, fwierzbicki, rob128
Priority: Keywords:

Created on 2011-11-19.01:31:06 by rob128, last changed 2012-03-20.17:52:56 by fwierzbicki.

Messages
msg6724 (view) Author: (rob128) Date: 2011-11-19.01:31:05
Using something like:
@my_function

''' results in'''
File "<stdin>", line 1
@my_function
           ^
SyntaxError: mismatched input '<EOF>' expecting CLASS

This error does not occur from a proper script or using PyDev in Eclipse (it is shown briefly until the following 'def' line is entered. This error does not occur in CPython's interpreter (tested with 3.2.2 and 2.7.2).
msg6725 (view) Author: (rob128) Date: 2011-11-19.01:35:33
Tested on 64bit Win7 and 32bit Linux (Arch).
msg6726 (view) Author: Greg (Ghuff) Date: 2011-11-21.16:32:47
I'm having this issue as well, getting the same error after attempting to use a decorator, it is only occurring in interactive interpreter. Tested on WixXP 32bit and Linux 64bit both using the latest release (Jython 2.5.2 (Release_2_5_2:7206)).
msg6837 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.19:14:15
This issue is related (identical?) to #1749

Close as duplicate?
msg6925 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-03-20.17:52:56
#1749 is indeed identical - this is fixed for the upcoming 2.5.3b2.
History
Date User Action Args
2012-03-20 17:52:56fwierzbickisetstatus: open -> closed
resolution: fixed
messages: + msg6925
nosy: + fwierzbicki
2012-03-19 19:14:15amaksetnosy: + amak
messages: + msg6837
2011-11-21 16:32:48Ghuffsetnosy: + Ghuff
messages: + msg6726
2011-11-19 01:35:33rob128setmessages: + msg6725
2011-11-19 01:31:06rob128create