<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2019 at 12:46 AM Anders Hovmöller <<a href="mailto:boxed@killingar.net">boxed@killingar.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 15 May 2019, at 07:51, Jonathan Goble <<a href="mailto:jcgoble3@gmail.com" target="_blank">jcgoble3@gmail.com</a>> wrote:<br>
> <br>
> That's not a realistic goal; there are some use cases, including in<br>
> CPython builtins, that cannot be accomplished without positional-only<br>
> arguments. For example, the current behavior of the `dict` constructor<br>
> is to accept both certain iterables as a positional-only argument<br>
> and/or keyword arguments from which a dict can be created. If the<br>
> iterable argument was not positional-only, then it would be forced to<br>
> consume a keyword (even if the caller passes it as a positional<br>
> argument), meaning that that keyword could never be included in<br>
> **kwargs and could not become a dict key via keyword arguments.<br>
<br>
You lost me. How is this not handled by *args and **kwargs? I think it is. "Positional only" isn't needed in this case. <br>
<br>
> Additionally, PEP 570 [1], which will add syntax for positional-only<br>
> parameters in Python functions, was accepted by Guido last month.<br></blockquote><div><br></div><div>It was actually a decision of the Python steering council, of which Guido is a member and so am I.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I know and in my opinion it's a big mistake. It adapts python to a misfeatures of C extension code instead of making the C extentions play nice end behave like python.</blockquote><div><br></div><div>There's actually more to it than that (it actually resolves various bugs we had in the stdlib that have nothing to do with C extension modules). The details can be found in the PEP.<br></div></div></div>