[Python-ideas] os.path.abspath - optional startdir argument

Terry Reedy tjreedy at udel.edu
Fri Jul 25 10:26:15 CEST 2014


On 7/25/2014 3:40 AM, Wolfgang Maier wrote:

> Yes, the syntax is nicer *now*, but with my proposed change to
> os.path.abspath things would look quite similar:
>
> pathlib version now:
>>  >>> path.Path('../../../Python27/lib', 'ast.py').resolve()
>
> os.path as proposed:
> os.path.abspath('ast.py', '../../../Python27/lib')
>
> So I would see this as an argument for the proposal rather than against it.
>
> Even if the pathlib module will stay, I am not sure whether that should
> exclude enhancements in overlapping parts of os.path.

I understand your reasoning. But it leaves out the following. When a 
feature is added, use of the feature makes code incompatible with 
previous versions. So we generally like new features to add more than 
this one would.

If you look hard enough, I am sure that you can find an addition that by 
this criteria should not have been added. If you do, I will probably 
agree that it should not have been.

> Anyway, that whole thing is not that important to me, so if nobody finds
> it useful, then let's stick to the status quo.

It is a matter of useful enough to justify the cost.

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list