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
   ">

(original) (raw)



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