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 terry.reedy
Recipients Arfrever, barry, carsten.klein@axn-software.de, ezio.melotti, georg.brandl, larry, mark.dickinson, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2013-02-23.20:27:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361651240.1.0.519843162096.issue16801@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy called subclassing 'particular and cumbersome'.
'Cumbersome' is an opinion. I consider subclassing elegant. The ease of doing so and specializing only what one needs to is a major feature of Python. It only took me a couple of minutes to whip up solutions for two different cases.

I think 'particular' is wrong. Subclassing is a general solution for a particular class of values. As I illustrated, it results in the value getting its custom representation *everywhere*. Other solutions seem to give it its custom representation only in the particular context of standard signature displays, and its 'regular' not-so-good representation when directly accessed. To me, that is much worse.
History
Date User Action Args
2013-02-23 20:27:20terry.reedysetrecipients: + terry.reedy, barry, georg.brandl, rhettinger, mark.dickinson, larry, ezio.melotti, Arfrever, r.david.murray, carsten.klein@axn-software.de, serhiy.storchaka
2013-02-23 20:27:20terry.reedysetmessageid: <1361651240.1.0.519843162096.issue16801@psf.upfronthosting.co.za>
2013-02-23 20:27:20terry.reedylinkissue16801 messages
2013-02-23 20:27:19terry.reedycreate