Re: new feature in Python

2020-09-30 Thread Christman, Roger Graydon
On 30/09/2020, yonatan <53770...@gmail.com> proposed: > instead of > con = "some text here" > con = con.replace("here", "there") > we could do > con = "some text here" > con .= replace("here", "there") That would require a major rewrite of the grammer of the Python language, which would probab

Re: new feature in Python.

2020-09-30 Thread Chris Angelico
On Thu, Oct 1, 2020 at 2:14 AM Jason C. McDonald wrote: > > > > 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

Re: new feature in Python.

2020-09-30 Thread Jason C. McDonald
> 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