Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make methods chainable #7

Closed
ksamuel opened this Issue · 4 comments

3 participants

@ksamuel

Returning None is not a feature used in any way.

All methods that don't need to return something could return self, making it possible to do calls like:

PROJECT_DIR = path(file).realpath.parent
TMP_DIR = (PROJECT_DIR.parent / 'tmp').makedirs_p()

@jaraco
Owner

So that example works just fine except that makedirs_p doesn't return the dir. Seems like a reasonable improvement to me.

@ksamuel
@xentac

#10

Pull request to fix makedirs_p and makedirs.

@jaraco
Owner

Released in 2.5

@jaraco jaraco closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.