I know this isn't really the place for this conversation, but:
 
which is what `os.PathLike` represents, hence why `str` isn't covered by it);

wait, what? It seems so clear to me that "PathLike" (as a type specifier) would mean: anything that can be passed into os.fspath to give me a path. (or, of course to the stdlib functions that take paths)

Isn't the entire purpose of os.fspath that you can write code like:

def fun(some_kind_of_path):
   some_kind_of_path = os.fspath(some_kind_of_path)

   (or just pass it to a function you takes PathLIke)

and go on your merry way -- e.g. duck typing, baby!

Is there really no way to annotate that simply now?

-CHB

--
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython