new feature in Python.

yonatan 5377074j at gmail.com
Wed Sep 30 11:34:43 EDT 2020


Hi, My name is Jonatan and i am programming in Python for about 4 years, 
I have a great idea, there are __iX__` methods, such as `__ior__`, `__iadd__`, `__iand__` etc.., which implements the |=, +=, &= behavior, 
it would be nice if you could implement also `__igetattr__` or something, which means:

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

we could do

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


Please let me know what do you think about it, Jonatan.


More information about the Python-list mailing list