This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients mark.dickinson, r.david.murray, veky
Date 2016-06-29.14:09:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467209341.37.0.757588764459.issue27363@psf.upfronthosting.co.za>
In-reply-to
Content
Right, that isn't the invariant.  Eval is the normal invariant, but not all classes *can* meet it, in which case if they can provide a repr that *can* be turned back into the value losslessly somehow, that's better than not doing so at all.

Still, changing the repr would be the best way to meet the desired invariant, if we're willing to do that.  This could be the first stdlib case of a non-string having a useful __str__ if we make the __str__ still return what the current __repr__ does.
History
Date User Action Args
2016-06-29 14:09:01r.david.murraysetrecipients: + r.david.murray, mark.dickinson, veky
2016-06-29 14:09:01r.david.murraysetmessageid: <1467209341.37.0.757588764459.issue27363@psf.upfronthosting.co.za>
2016-06-29 14:09:01r.david.murraylinkissue27363 messages
2016-06-29 14:09:01r.david.murraycreate