[Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

Greg Ewing greg.ewing at canterbury.ac.nz
Wed May 29 03:46:10 EDT 2019


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

-- 
Greg


More information about the Python-ideas mailing list