Message182816
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. |
|
Date |
User |
Action |
Args |
2013-02-23 20:27:20 | terry.reedy | set | recipients:
+ 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:20 | terry.reedy | set | messageid: <1361651240.1.0.519843162096.issue16801@psf.upfronthosting.co.za> |
2013-02-23 20:27:20 | terry.reedy | link | issue16801 messages |
2013-02-23 20:27:19 | terry.reedy | create | |
|