[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ideas
Subject:    Re: [Python-ideas] Method signature syntactic sugar (especially for dunder methods)
From:       Nick Timkovich <prometheus235 () gmail ! com>
Date:       2016-11-08 22:05:48
Message-ID: CAHkxivddxwzjtYphqQOmOnhzJsKhvS+Z15X3k5wzg1fuir0RgQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Also you can support future changes to the syntax (e.g. __matmul__ and
friends from 3.5, __aiter__ from 3.5.2) with a single codebase rather than
having to push that grammar back to previous versions (impossible?) or have
the grammar for magic methods be extraordinarily general (messy?)

On Tue, Nov 8, 2016 at 3:56 PM, Greg Ewing <greg.ewing@canterbury.ac.nz>
wrote:

> Another advantage of dunder method names is that you
> can google them. Someone coming across a method called
> "__foo__" can easily find documentation about it, but
> it's not so easy to do that for special syntax.
>
> --
> Greg
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>

[Attachment #5 (text/html)]

<div dir="ltr">Also you can support future changes to the syntax (e.g. __matmul__ and \
friends from 3.5, __aiter__ from 3.5.2) with a single codebase rather than having to \
push that grammar back to previous versions (impossible?) or have the grammar for \
magic methods be extraordinarily general (messy?)</div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 8, 2016 at 3:56 PM, Greg \
Ewing <span dir="ltr">&lt;<a href="mailto:greg.ewing@canterbury.ac.nz" \
target="_blank">greg.ewing@canterbury.ac.nz</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Another advantage of dunder method names is that you<br> can \
google them. Someone coming across a method called<br> &quot;__foo__&quot; can easily \
find documentation about it, but<br> it&#39;s not so easy to do that for special \
syntax.<span class="HOEnZb"><font color="#888888"><br> <br>
-- <br>
Greg</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" \
target="_blank">Python-ideas@python.org</a><br> <a \
href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" \
target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-ideas</a><br> \
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" \
target="_blank">http://python.org/psf/codeofco<wbr>nduct/</a><br> \
</div></div></blockquote></div><br></div>



_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic