3 ms·
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 u
by duckerude 7y ago
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.
- timothycrosley 7y agoThat's a great call! I'll update this to use trailing underscore in a later version
- Izkata 7y agoPersonally, I like how django does it, where one of the kwargs accepts a dict, and that dict is what's passed along as kwargs to the next level.
- timothycrosley 7y agoUpdated in latest release to use trailing underscore: https://timothycrosley.github.io/hypothesis-auto/CHANGELOG/ https://timothycrosley.github.io/hypothesis-auto/CHANGELOG/ figured it would be the least painful the earlier I did it :)
- duckerude 7y agoGreat! 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.