On 04/14/2015 01:40 PM, Eric V. Smith wrote: > I'm working on adding a numeric_owner parameter to some tarfile methods > (http://bugs.python.org/issue23193), > > In a review, Berker suggested making the parameter keyword-only. I agree > that you'd likely never want to pass just "True", but that > "numeric_owner=True" would be a better usage. Boolean parameters are the classic problem that keyword-only parameters solve. It forces the caller to provide context for the parameter, solving the mystery-meat API problem of tarfile.extractall(".", None, True) On 04/14/2015 01:56 PM, Paul Sokolovsky wrote: > But newer parts of stdlib, e.g. asyncio, visibly overuse kw-only args. Overuse? asyncio? You mean "that thing Guido just wrote last year"? The most practical definition I've heard for the word "pythonic" is "code like Guido writes". //arry/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150414/28901fe3/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4