Steven D'Aprano wrote:
So math.sin is little different from math_sin, but the fact that math alone is a module, a first-class object, and not just a prefix of the name, makes a big difference.
This is important because it provides ways of referring to things in the module without having to write out the whole module name every time, e.g. import math as m y = m.sin(x) Would it be useful to pull out mystring.re and use it this way? I don't know. Maybe sometimes, the same way that extracting bound methods is sometimes useful. -- Greg _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/