Closed rascalking closed 2 years ago
This PR looks good to me, except that it might be slightly better to use if foo is None:
instead of if not foo:
for all the conditionals (that'd be a trivial change to apply consistently throughout the PR). Thanks, @rascalking.
@erinhengel, if you're no longer maintaining this repository, then I'll fork a copy so I can apply this PR. But I wanted to check first, because if you are still maintaining Textatistic, then I'd much rather stay on your upstream copy and not run my own fork.
Hey @kfogel. No I'm no longer maintaining this repository so please go ahead and fork it.
Will do, and thanks for the prompt & clear reply, @erinhengel.
Okay, https://github.com/kfogel/Textatistic has now merged this PR on its master
branch, with my is None
change added on top (for all such conditionals, not just the ones in this PR).
doing so means they get instantiated on import, and potentially reused across multiple calls to a function.
also, if you're running as a user that doesn't have a home directory, that means that the
Hyphenator('en_US')
call fails with a PermissionError before the caller has a chance to pass their own in.