I personally find that keyword only arguments make for nicer APIS. It also makes subclassing easier because you are free to add new positional arguments later. Especially for boolean arguments, I think keyword only is a great API choice. On Tue, Apr 14, 2015 at 2:06 PM, Steven D'Aprano <steve at pearwood.info> wrote: > On Tue, Apr 14, 2015 at 01:40:40PM -0400, Eric V. Smith wrote: > > > But, I don't see a lot of keyword-only parameters being added to stdlib > > code. Is there some position we've taken on this? Barring someone saying > > "stdlib APIs shouldn't contain keyword-only params", I'm inclined to > > make numeric_owner keyword-only. > > I expect that's because keyword-only parameters are quite recent (3.x > only) and most of the stdlib is quite old. > > Keyword-only feels right for this to me too. > > -- > Steve > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/joe%40quantopian.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150414/9524a3c8/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