Title: __doc__ of PyString objects is always "The most base type" (bug in expose-mechanism?)
Type: Severity: major
Components: Core Versions: Jython 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: stefan.richthofer
Priority: Keywords:

Created on 2014-11-19.01:53:46 by stefan.richthofer, last changed 2014-11-19.01:53:46 by stefan.richthofer.

msg9212 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2014-11-19.01:53:45
test0 = "test"
print test0.__doc__
print type(test0)

It should print (and does so in CPython):
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

But it *does* print:
The most base type

Looking at the Java code everything looks fine. The expose-line of PyString reads
@ExposedType(name = "str", doc = BuiltinDocs.str_doc)
which should be correct I suppose.
With PyUnicode an equal line works perfectly well. In PyString case it somehow delegates the expose line to PyObject, but I can't see why.
Adding base = PyBaseString.class does not fix it. Any ideas?

I would not bother if the doc of PyString would just be wrong, but this might indicate a bug in the expose-mechanism, so I set severity to "major". Maybe this affects other exposes as well.
Date User Action Args
2014-11-19 01:53:47stefan.richthofercreate