On Sun, Feb 12, 2017, at 21:55, Steven D'Aprano wrote: > But honestly, no. This is not going to happen. .Net VB and C# have > something like this, as does Lua, and people still write classes the > ordinary way 99.99% of the time.
The VB/C# thing you are referring to is, I assume, extension methods. But they're really very different when you look at it. Extension methods are only used when the namespace containing them has been imported, and are based on the static type of the object they are being called on. They also have no access to the object's private members. Python doesn't have static types and doesn't have private members, and using this would make a real modification to the type the method is being added to rather than relying on namespaces being imported, so there would be fewer barriers to "use this for everything" than "use extension methods for everything in C#". _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/