On Wed, May 29, 2019 at 9:46 AM Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
>
> Yanghao Hua wrote:
> > If I use python to do
> > something and I have to type more chars it doesn't make sense for me.
>
> If you shorten it to "n" you get
>
>    x.n = 4
>
> which is exactly the same number of characters as your "<==" proposal:
>
>    x <== 4
>
> Getting a bit more creative, you could use the little-known "._="
> operator that already exists in Python. :-)
>
>    x ._= 4

Indeed this is clever and less chars, but not as readable as x.next =
4 nor x <== 4, right? and I think one thing python is very good at is
about readability. Sorry about my paranoia ... I get the idea that the
python community are very cautious and not willing to just add a new
operator which I fully understood (and I understood it is difficult
for the existing python community to see the value), for me I believe
it is worth doing and I will make a PEP even though it is going
nowhere, as well as a reference implementation to show how it can
simplify things in a dozen of cases: easier descriptor like feature
where the object can be instantiated anywhere, constructing pipe-lined
operations like drawing, separation of instantiation and use, and of
course a complete HDL design (as well as a simulator) in python with
this syntax.

And I think I will settle on the "<==" and "==>" operator, it is
really intuitive and I liked it. I just hope this two will not be
taken for other purposes in python in the future ... :) Next time
someone proposed for using this two operator please you guys help to
reject it ;-)
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to