On Thu, Dec 17, 2020 at 10:47 AM Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > A feature of Prothon was that a.b() and t = a.b; t() would do > quite different things (one would pass a self argument and the > other wouldn't). > > I considered that a bad thing. I *like* the fact that in Python > I can use a.b to get a bound method object and call it later, > with the same effect as if I'd called it directly.
Ewww. Yes, that is definitely a bad thing. Just look at JavaScript, which has that exact distinction - a.b() will set 'this' to a, but t() would set 'this' to...... well, that depends on a lot of things, but it probably won't be a. JS's "arrow functions" behave somewhat more sanely, but at the expense of being per-instance, so the rules are a bit more complicated for constructing them. But at least you don't have to worry about lifting them out of an object. ChrisA _______________________________________________ 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/ZQTEPVPW7DFITMVM3VGEEWUE5MC43S26/ Code of Conduct: http://python.org/psf/codeofconduct/