[issue15202] followlinks/follow_symlinks/symlinks flags unification

Larry Hastings report at bugs.python.org
Wed Jun 27 11:52:19 CEST 2012


Larry Hastings <larry at hastings.org> added the comment:

I assert that "followlinks" and "symlinks" are both bad names.  I dislike "followlinks" because "links" is ambiguous; both hard links and soft links are "links", but it's only modifying behavior regarding one of them.  Also, it's not PEP-8-compliant (which we can forgive because I'm pretty sure it predates PEP 8).  "symlinks" is far worse, because it's so ambiguous--quick, what does "symlinks=False" mean?  Examine symlinks, or follow them?

I agree that we can't rename "followlinks" and "symlinks" in 3.x.  All we can do for now is move forward.  At the same time I refused to be shackled by misguided old nomenclature.

So, certainly, I don't want to see "follow_symlinks" changed.  True story: the reason I started writing the patch for #14626 was so I could make sure it used the name "follow_symlinks".  I was dead certain Serhiy would use one of the existing names ;-)


If you really really want this to happen, you'll have to get Georg's permission--and the sooner the better.  Already I suspect it is too late.  If it ships in 3.3 it will absolutely be too late.


I suggest another approach: add a redundant "follow_symlinks" argument to os.walk, os.fwalk, and the shutil functions.  Prefer the new name in documentation but document the presence of the old one.  Throw an exception if both are specified in an invocation.  We could do that in 3.4.

----------
nosy: +georg.brandl

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15202>
_______________________________________


More information about the Python-bugs-list mailing list