'Initialize and return a local Path instance.
Path can be relative to the current directory.
If path is None it defaults to the current working directory.
If expanduser is True, tilde-expansion is performed.
Note that Path instances always carry an absolute path.
Note also that passing in a local path object will simply return
the exact same path object. Use new() to get a new copy.'

def __init__(self, path=None, expanduser=False):

    if (path is None):
        self.strpath = py.error.checked_call(os.getcwd)
    else:
        try:
            path = fspath(path)
        except TypeError:
            raise ValueError('can    only    pass    None,    Path    instances    or    non-empty    strings    to    LocalPath')
        if expanduser:
            path = os.path.expanduser(path)
        self.strpath = abspath(path)
