On Wed, Nov 16, 2016 at 10:48 AM, Mikhail V <mikhail...@gmail.com> wrote:
> On 16 November 2016 at 10:27, Paul Moore <p.f.mo...@gmail.com> wrote: > > On 16 November 2016 at 08:51, Mikhail V <mikhail...@gmail.com> wrote: > >> What semantics it will fundamentally break or so hard to implement? > > > > I'm afraid I don't have time at the moment to fully review your email, > > but my first impression is that you are proposing that the name "self" > > be treated specially. It's going to be very difficult to convince > > people that this is a good idea. > > Oh Paul, come on, pleeeeease. > I am making an **example**. Write a "poo" instead or a poo pile character, > whatever. You think I am an idiot and don't know that there is "self" in > OOP. > Maybe I should just point out a sec that saying this is a great way to get people to not listen to you. As for your actual question: I'm not sure if I understand correctly, but I think you got things a little mixed up, or I'm not reading this the right way (also likely). Let's not use self anymore as an example, since that ended in fire and brimstone. Let's use something like this: A = source_var + 1 where `source_var` is a magic thing that refers to the target variable. Does that get the same idea across? Yes? Okay. The main reason that this would be difficult to translate isn't difficulty, but just readability. It's weird that using source_var would use __iadd__, but anything else would use __add__. Now, what I think everyone was telling you about as for "difficulty translating" is this: A = A + 1 ==> A += 1 Similar problem: semantics change. If someone decided to be weird and have __add__ and __iadd__ do two different things, this would completely break that. Granted, that's a stupid idea to begin with, but it's still poor justification for the code breakage. > When I was writing that I just thought, should I make a special note > that I am making it only for example, but then thought, oh that would > be too pedantic. > You say you have no time and write a whole page about it, > so don't blame me that I take too much time from you. > > Mikhail > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://kirbyfan64.github.io/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/