Quantcast

No ‘from __future__ import print_function’ in latest jython

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No ‘from __future__ import print_function’ in latest jython

Cecil Westerhof
When I execute in the latest Jython:
    from __future__ import print_function
I get:
    Traceback (innermost last):
      (no code object) at line 0
      File "<console>", line 1
    SyntaxError: future feature print_function is not defined

This is not implemented in the latest jython? I prefer to keep all my
code as far as possible the same. The closer I get to DRY, the happier
I am. ;-)

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No ‘from __future__ import print_function’ in latest jython

Cecil Westerhof
On Sunday 21 Jun 2015 09:56 CEST, Cecil Westerhof wrote:

> When I execute in the latest Jython:
> from __future__ import print_function
> I get:
> Traceback (innermost last):
> (no code object) at line 0
> File "<console>", line 1
> SyntaxError: future feature print_function is not defined
>
> This is not implemented in the latest jython? I prefer to keep all
> my code as far as possible the same. The closer I get to DRY, the
> happier I am. ;-)

My bad, I started the old version instead of the latest when I tested
this. Sorry for the noise.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No ‘from __future__ import print_function’ in latest jython

Laura Creighton-2
In reply to this post by Cecil Westerhof
Do you have Jython 2.7 released a few weeks ago?

Laura


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No ‘from __future__ import print_function’ in latest jython

Cecil Westerhof
In reply to this post by Cecil Westerhof
On Sunday 21 Jun 2015 11:05 CEST, Laura Creighton wrote:

> Do you have Jython 2.7 released a few weeks ago?

Yes, but I was dumb enough to start the old version when I did this.
:-(

There is still one problem:
======================================================================
>>> from __future__ import print_function
>>> print()
()
======================================================================

While it should be:
======================================================================
>>> from __future__ import print_function
>>> print()

======================================================================

But I think I can live with it for the moment.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No ‘from __future__ import print_function’ in latest jython

Laura Creighton-2
In a message of Sun, 21 Jun 2015 12:21:03 +0200, Cecil Westerhof writes:

>On Sunday 21 Jun 2015 11:05 CEST, Laura Creighton wrote:
>
>> Do you have Jython 2.7 released a few weeks ago?
>
>Yes, but I was dumb enough to start the old version when I did this.
>:-(
>
>There is still one problem:
>======================================================================
>>>> from __future__ import print_function
>>>> print()
>()
>======================================================================
>
>While it should be:
>======================================================================
>>>> from __future__ import print_function
>>>> print()
>
>======================================================================
>
>But I think I can live with it for the moment.
>
>--
>Cecil Westerhof
>Senior Software Engineer
>LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>--
>https://mail.python.org/mailman/listinfo/python-list

That's a bug.  Go add it to
http://bugs.jython.org/issue2007  so when the bugs with
print_function get fixed, they will be sure to fix that one too.

Laura

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No ‘from __future__ import print_function’ in latest jython

Cecil Westerhof
In reply to this post by Cecil Westerhof
On Sunday 21 Jun 2015 12:54 CEST, Laura Creighton wrote:

> In a message of Sun, 21 Jun 2015 12:21:03 +0200, Cecil Westerhof
> writes:
>> On Sunday 21 Jun 2015 11:05 CEST, Laura Creighton wrote:
>>
>>> Do you have Jython 2.7 released a few weeks ago?
>>
>> Yes, but I was dumb enough to start the old version when I did
>> this. :-(
>>
>> There is still one problem:
>> ======================================================================
>>>>> from __future__ import print_function
>>>>> print()
>> ()
>> ======================================================================
>>
>> While it should be:
>> ======================================================================
>>>>> from __future__ import print_function
>>>>> print()
>>
>> ======================================================================
>>
>> But I think I can live with it for the moment.
>>
>> --
>> Cecil Westerhof
>> Senior Software Engineer
>> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>
> That's a bug.  Go add it to
> http://bugs.jython.org/issue2007  so when the bugs with
> print_function get fixed, they will be sure to fix that one too.

Done.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Loading...