Message11981

Author psykiatris
Recipients Arfrever, jeff.allen, psykiatris, zyasoft
Date 2018-05-15.15:29:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526398154.82.0.682650639539.issue2305@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for your thought provoking message.

Let me see if I can be clearer. Here is the code from jython.java:
=========
if (!opts.interactive) {
            // Not (really) interactive, so do not use console prompts
            systemState.ps1 = systemState.ps2 = Py.EmptyString;
        }
===========
I cannot change the above to PyAttributeDeleted.INSTANCE, because it's already set in PySystemState.java: as below:
============
public PyObject ps1 = PyAttributeDeleted.INSTANCE;
public PyObject ps2 = PyAttributeDeleted.INSTANCE;
===========

To be honest, (and I've tested this) the snippet in jython.java is redundant. Why? Because if it's not interactive, it's not going to show the prompts anyway, so why have code worrying about it when it's already set in SystemState?

I have attached screenshots that show ps1 and ps2 as JavaTypes 'attrbute deleted' and then becoming strings. 

It is a matter of doing a loop to remove these two keys from the __dict__, that challenge is finding the right spot.

In an earlier post, I questioned even having the interactive prompts connected to systemstate.ps1/ps2. I see those two variables used in other code in PySystemState.java and it's confusing....
History
Date User Action Args
2018-05-15 15:29:14psykiatrissetmessageid: <1526398154.82.0.682650639539.issue2305@psf.upfronthosting.co.za>
2018-05-15 15:29:14psykiatrissetrecipients: + psykiatris, zyasoft, jeff.allen, Arfrever
2018-05-15 15:29:14psykiatrislinkissue2305 messages
2018-05-15 15:29:13psykiatriscreate