Message10703

Author jsaiz
Recipients jsaiz
Date 2016-02-03.12:52:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454503925.74.0.102244974937.issue2459@psf.upfronthosting.co.za>
In-reply-to
Content
In Python (so therefore in Jython), it is possible to write multiline comments by putting the text between triple quotes:

"""
this is a
multiline comment
"""

However, in Jython 2.7.0 the interpreter no longer waits for the user to complete the string, but the initial triple quote is somehow considered a valid command (although doing nothing), so the comment cannot be completed:

linux> jython2.5
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_60
Type "help", "copyright", "credits" or "license" for more information.
>>> """
... this is a 
... multiline comment
... """
'\nthis is a\nmultiline comment\n'

linux> jython2.7
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_60
Type "help", "copyright", "credits" or "license" for more information.
>>> """
>>> this is a
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'this' is not defined


Is this a regression? Or is it intended behaviour?
History
Date User Action Args
2016-02-03 12:52:05jsaizsetrecipients: + jsaiz
2016-02-03 12:52:05jsaizsetmessageid: <1454503925.74.0.102244974937.issue2459@psf.upfronthosting.co.za>
2016-02-03 12:52:05jsaizlinkissue2459 messages
2016-02-03 12:52:04jsaizcreate