Re:Show HN: Python Tests That Write Themselves
by duckerude on Wednesday September 18, 2019 @02:42PM
(#21008571)
I believe Raymond Hettinger now considers that a mistake, and wishes he had gone with a trailing underscore (param_) instead. A trailing underscore is just as unlikely to lead to a collision, but less confusing.
[ Parent
| on HN ]
Re:Show HN: Python Tests That Write Themselves
by timothycrosley on Wednesday September 18, 2019 @02:55PM
(#21008705)
That's a great call! I'll update this to use trailing underscore in a later version
Re:Show HN: Python Tests That Write Themselves
by timothycrosley on Thursday September 19, 2019 @02:04AM
(#21013715)
Updated in latest release to use trailing underscore: https://timothycrosley.github.io/hypothesis-auto/CHANGELOG/ figured it would be the least painful the earlier I did it :)
Re:Show HN: Python Tests That Write Themselves
by duckerude on Thursday September 19, 2019 @02:16AM
(#21013759)
Great!
It takes a bit of manual juggling, but if you take kwargs anyway you could inspect them to check for the old-style parameters, and use them if they're present, perhaps with a warning. That way you don't have to break compatibility.