On Sun, May 6, 2018 at 8:47 PM, Nick Coghlan <firstname.lastname@example.org> wrote:
> On 7 May 2018 at 13:33, Nathaniel Smith <email@example.com> wrote:
>> Spit-balling: how about __filepath__ as a
>> lazily-created-on-first-access pathlib.Path(__file__)?
>> Promoting os.path stuff to builtins just as pathlib is emerging as
>> TOOWTDI makes me a bit uncomfortable.
> pathlib *isn't* TOOWTDI, since it takes almost 10 milliseconds to import it,
> and it introduces a higher level object-oriented abstraction that's
> genuinely distracting when you're using Python as a replacement for shell
Hmm, the feedback I've heard from at least some folks teaching
intro-python-for-scientists is like, "pathlib is so great for
scripting that it justifies upgrading to python 3".
data_path = __filepath__.parent / "foo.txt"
more distracting than
data_path = joinpath(dirname(__file__), "foo.txt")