<div dir="ltr">For what it's worth, 'cast(x, T)' also reads far more naturally to me.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 3:08 PM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, 23 Mar 2015 14:17:20 -0700<br>
Nathaniel Smith <<a href="mailto:njs@pobox.com">njs@pobox.com</a>> wrote:<br>
<br>
> On Mar 23, 2015 1:03 PM, "Guido van Rossum" <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
> ><br>
> > On Sun, Mar 22, 2015 at 11:02 PM, David Foster <<a href="mailto:davidfstr@gmail.com">davidfstr@gmail.com</a>><br>
> wrote:<br>
> >><br>
> >> * +1 for the argument order cast(x, T). This is consistent with (x: T)<br>
> elsewhere.<br>
> ><br>
> ><br>
> > I disagree on this. It goes against the argument order of casts in other<br>
> languages, e.g. C, C++, Java, and even in Python -- you write int(x), not<br>
> x(int).<br>
><br>
> I don't have any strong opinion here, but I don't find the consistency<br>
> argument convincing. In int(x), 'int' is the verb, and in English verbs<br>
> come before undergoers ("I am inting the x"). In cast(...), though, cast is<br>
> the verb, x remains the undergoer, and int is conceptualized as the<br>
> destination (or something like that), and destinations go in prepositional<br>
> clauses after the object. You'd say "I'm casting the x to int"; (cf "I'm<br>
> throwing the ball to Sarah"). "I'm casting to int the x" is extremely weird.<br>
<br>
</div></div>I agree with cast(x, T). It also nicely mirrors isinstance(x, T).<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Antoine.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>advocates of freedom in prisons.  Intellectual property is<br>to the 21st century what the slave trade was to the 16th.<br></div>
</div>