
On Wed, Feb 29, 2012 at 8:19 AM, Barry Warsaw <barry@python.org> wrote:
Since this question came up recently, what do you think of adding some more helpers to reprlib to make this even easier to do? I know I just added some utility functions to PulpDist [1] to avoid reinventing that particular wheel for each of my class definitions. Cheers, Nick. [1] http://git.fedorahosted.org/git/?p=pulpdist.git;a=blob;f=src/pulpdist/core/u... Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

Nick Coghlan wrote:
Your question is too general. Of course people should be in favour of helpers to simplify making good reprs, but that's like asking if people are in favour of solving world hunger. Who wouldn't be? But the answer should depend on what the helpers do, how well they do them, and whether or not they actually help. I fear getting carried away with enthusiasm for repr helpers and dumping a lot of unnecessary, trivial or sub-optimal helpers in reprlib, where they will be enshrined as "the one obvious way to do it" when perhaps they shouldn't be. Since you are the author of them, I'm sure that they scratch your itches, but will they scratch other people's? I suggest publishing them as recipes on ActiveState first, and see what feedback you get. http://code.activestate.com/recipes/langs/python/top/ -- Steven

Nick Coghlan wrote:
Your question is too general. Of course people should be in favour of helpers to simplify making good reprs, but that's like asking if people are in favour of solving world hunger. Who wouldn't be? But the answer should depend on what the helpers do, how well they do them, and whether or not they actually help. I fear getting carried away with enthusiasm for repr helpers and dumping a lot of unnecessary, trivial or sub-optimal helpers in reprlib, where they will be enshrined as "the one obvious way to do it" when perhaps they shouldn't be. Since you are the author of them, I'm sure that they scratch your itches, but will they scratch other people's? I suggest publishing them as recipes on ActiveState first, and see what feedback you get. http://code.activestate.com/recipes/langs/python/top/ -- Steven
participants (2)
-
Nick Coghlan
-
Steven D'Aprano