Re: Jython 2.7.0 final released!

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lang.jython.devel
Message-ID <CADrh4zJ65k6+arSca6gYD-5OaFHx=rHM-C_vOVttSnQQ+3nUmQ@mail.gmail.com>
Oops the hybrid should have been:

raise_stmt: 'raise' [test ['from' test][',' test [',' test]]]

On Fri, May 8, 2015 at 4:31 PM, [email protected]
<[email protected]> wrote:
> On Fri, May 8, 2015 at 5:41 AM, Stefan Richthofer
> <[email protected]> wrote:
>>>>grammar to keep 2.7 and 3.5 sort of parsing at the same time
>>
>> I had no idea this would be actually possible, but it sounds
>> very interesting. Did you consider this as an actual feature
>> for Jython3?
> What might make sense someday if I have time would be conditional
> parsing of either with the same grammar. Actually parsing at the same
> time creates terrible things (and I am perpetrating terrible things
> for now).
>
> For example, raise_stmt in Python2 is (from CPython's Grammar) looks like:
> raise_stmt: 'raise' [test [',' test [',' test]]]
>
> Python3's is:
> raise_stmt: 'raise' [test ['from' test]]
>
> What I am doing would translate to:
> raise_stmt: 'raise' [test ['from'][',' test [',' test]]]
>
> Which would allow horrors like:
>
> raise Exception from None, foo, bar
>
>> Did you consider this as an actual feature
>> for Jython3? Parsing 2.7 and 3.5 at the same time sounds weired,
>> but what about something like a new import directive, let's say
>> "import2" to import code that is known to be Python 2.7?
> This would take much more than a conditional grammar, we'd have to
> somehow keep two runtimes around and be able to mix them. We'd need
> things like sometimes old style classes are permitted, sometimes not,
> etc. That's definitely too hard (at least for me) and probably way too
> ugly. Although it is the sort of crazy thing that can sometimes
> interests Jim :)
>
> -Frank

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.