David Mertz writes: > That said, one crucial difference is once an extension method is > "used" we are stuck with it for the entire module.
While you get it for all objects of type(foo) in the whole module, presumably whatever syntax you used to "use" it, you can use to get rid of it, or at least replace it with an extension that raises or logs or somehow signals that the extension is deactivated. Or maybe del works on it. > In contrast, functions can be both namespaced and redefined. [...] > We get scoping and namespaces that extension method lack. But isn't the point of an extension to a class that we want it to be class-wide in that module? I don't see why we should turn extensions into something we can already do with functions. (Assuming we want them at all, and so far only Steven's backporting application makes any sense to me). _______________________________________________ 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/WQ53AYI73FPQJ5NGUBS6JMGHG7OLTNUJ/ Code of Conduct: http://python.org/psf/codeofconduct/