Isaac Morland added the comment: On 1 August 2017 at 14:32, R. David Murray <rep...@bugs.python.org> wrote:
> > R. David Murray added the comment: > > I wrote a "parameterized tests" extension for unittest, and it has the > option of autogenerating the test name from the parameter names and > values. I've never used that feature, and I am considering ripping it out > before I release the package, to simplify the code. If I do I might > replace it with a hook for generating the test name so that the user can > choose their own auto-naming scheme. > > Perhaps that would be an option here: a hook for generating the name, that > would be called where you want your None processing to be? That would not > be simpler than your proposal, but it would be more general (satisfy more > use cases) and might be worth the cost. On the other hand, other > developers might not like the API bloat ;) > It's August, not April. Raymond Hettinger is accusing my proposed API of being potentially confusing, while you're suggesting providing a hook? All I want is the option of telling namedtuple() to make up its own typename, for situations where there should be one but I don't want to provide it. Having said that, if people really think a hook like this is worth doing, I'll implement it. But I agree that it seems excessively complicated. Let's see if auto-generation is useful first, then if somebody wants a different auto-generation, provide the capability. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31085> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com