The version of Python3.6 is planned (nevertheless, this is not explicitly mentioned anywhere, except for the line "Python-Version") the release of a new magic method __fspath__ ( https://www.python.org/dev/peps/pep-0519 ). The description seems clear:
It is an easy way to find out how to complete your path.
The goal is to make it easier for users to move to advanced objects representing file paths, while providing a convenient way to work with code that expects unicode or byte strings.
However, several points are not entirely clear:
Who is this update for? What users are we talking about? What would be a typical use case, whether in libraries or in application programs?
Usually, as an ordinary user, I write something like:
project_path = os.path.realpath(os.path.dirname(__file__)) config_path = os.path.join(project_path, 'configs', 'sub_configs', 'my_super_config.ini') conf = open(config_path, 'r', encoding="utf-8") and I see no reason to create because of this separate classes representing paths. Even if these are classes like ConfigPath, ConcreteProjectConfigPath, it’s not quite clear where and why you can cram a new method.