[Python-ideas] shutil.symlink to allow non-race replacement of existing link targets

Anders Hovmöller boxed at killingar.net
Tue May 14 00:40:15 EDT 2019



> On 14 May 2019, at 03:33, Steven D'Aprano <steve at pearwood.info> wrote:
> 
>> On Tue, May 14, 2019 at 12:22:05AM +0300, Serge Matveenko wrote:
>> 
>> As a regular library user, I see and expect no obvious difference
>> between `os.symlink` and `shutil.symlink`. 
> 
> You "see ... no obvious difference" between two functions that live in 
> completely different modules?

This happens due to historical accidents all the time. 

> Isn't the fact that they live in *different modules* obvious enough?

No. See above. 

> If os.symlink was exactly the same as shutil.symlink, we would not need 
> them both.

Sure we could. See above. 

> Do you also see and expect no obvious difference between list.remove and 
> os.remove? If so, today is your opportunity to learn something and 
> become a better programmer! *wink*

That's rude. That might work in person but I'd doubt it. Over email the "wink" doesn't change it enough. 

/ Anders 


More information about the Python-ideas mailing list