On 2020-09-30 08:41, Jonatan wrote:

instead of
con = "some text here"
con  = con.replace("here", "there")

we could do

con = "some text here"
con .= replace("here", "there")

(Your message had some odd formatting but thankfully there was a plain-text version included without the issue.)


In regards to the idea, I generally like it. I can imagine the arguments against, such as the X= augmented assignments are not the most readable. But if the others are beneficial, why not this one?

It appears mostly useful for strings however, any thought to other types or AttributeErrors?

-Mike
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ET6MUKB36MMQWKCKFXG6OIRYQ62CIA3X/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to