Author pjac
Recipients fwierzbicki, irmen, pjac
Date 2013-09-09.13:55:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Confirming the print_function does not work at the Jython prompt (Mac OS X):

$ ~/jython2.7b1/jython
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52) 
[OpenJDK 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_24
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>> print(1,2,3,4)
(1, 2, 3, 4)

Notice this is being interpreted as a print statement and a tuple.

Furthermore it does not seem to be working via a script which invokes doctests extracted from a file, specifically from Biopython has stopped working following changes in the test style to use print functions. e.g.

$ ~/jython2.7b1/jython
Skipping tests needing the following:
 - numpy
Running Tutorial doctests...
File "", line 150, in __main__.TutorialDocTestHolder.doctest_test_from_line_00601
Failed example:
    for index, letter in enumerate(my_seq):
        print(index, letter)
    0 G
    1 A
    2 T
    3 C
    4 G
    (0, 'G')
    (1, 'A')
    (2, 'T')
    (3, 'C')
    (4, 'G')

We have worked around this by modifying the print doctests:
Date User Action Args
2013-09-09 13:55:35pjacsetmessageid: <>
2013-09-09 13:55:35pjacsetrecipients: + pjac, fwierzbicki, irmen
2013-09-09 13:55:35pjaclinkissue2007 messages
2013-09-09 13:55:35pjaccreate