Message299672
On 1 August 2017 at 14:32, R. David Murray <report@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. |
|
Date |
User |
Action |
Args |
2017-08-02 20:50:38 | Isaac Morland | set | recipients:
+ Isaac Morland, rhettinger, steven.daprano, r.david.murray, methane, ethan.furman |
2017-08-02 20:50:38 | Isaac Morland | link | issue31085 messages |
2017-08-02 20:50:38 | Isaac Morland | create | |
|