code: def splitext(self):
          
          filename, ext = os.path.splitext(self)
          return self.__class__(filename), ext
docs: p.splitext() -> Return (p.stripext(), p.ext).
  
          Split the filename extension from this path and return
          the two parts.  Either part may be empty.
  
          The extension is everything from '.' to the end of the
          last path segment.  This has the property that if
          (a, b) == p.splitext(), then a + b == p.