I took some time on this one. Through my debug sessions, in jython.java, the vaiables ps1 and ps2 are assigned the JavaType 'attributedeleted', So far, so good.
As the following shows, both of these variables end up as type('str)...
===========
Jython 2.7.1 (, Sep 30 2017, 13:31:09)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_162
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> a = sys.ps1
>>> b = sys.ps2
>>> print a, b
>>> ...
>>> print type(a), type(b)
<type 'str'> <type 'str'>
>>> # Can you change the prompt?
>>> sys.ps1 = '===>'
===>
===># Yep
, But in this session only....
===>
======
When debugging, this code runs:
// Only defined if interactive, see https://docs.python.org/2/library/sys.html#sys.ps1
public PyObject ps1 = PyAttributeDeleted.INSTANCE;
public PyObject ps2 = PyAttributeDeleted.INSTANCE;
So, these two are set as type PyAttribute Deleted at first, but they change to PyString, and could that be the reason they show up when calling the dir(sys) function?
I do see that sys and PySystemState both return the same lis.
Still thinking....