Message8183

Author richardfearn
Recipients richardfearn
Date 2013-11-30.13:50:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385819442.46.0.785032045604.issue2105@psf.upfronthosting.co.za>
In-reply-to
Content
Inconsistent conversion of PyObject to String in StdoutWrapper

Given some object o, executing

  print o

causes Jython to build a string representation of o to be displayed on the console.

The conversion is done differently depending on whether stdout/stderr are accessed through a PyFile or a PyFileWriter.

Jython uses PyFile by default, and results in an object's __str__ method being called.

PyFileWriter causes an object's __repr__ method to be called instead, which is inconsistent with CPython.
History
Date User Action Args
2013-11-30 13:50:42richardfearnsetrecipients: + richardfearn
2013-11-30 13:50:42richardfearnsetmessageid: <1385819442.46.0.785032045604.issue2105@psf.upfronthosting.co.za>
2013-11-30 13:50:42richardfearnlinkissue2105 messages
2013-11-30 13:50:41richardfearncreate