[Python-ideas] Give regex operations more sugar

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jun 14 08:08:48 EDT 2018

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.


More information about the Python-ideas mailing list