Re: PyWart: os.path needs immediate attention!
- From: Andrew Berg <bahamutzero8825@xxxxxxxxx>
- Date: Fri, 29 Jul 2011 12:53:04 -0500
On 2011.07.29 12:22 PM, rantingrick wrote:
* New path module will ONLY support one path sep! There is NO reasonSo now you propose that not only does Python need drastic changes, but a
to support more than one. When we support more than one path sep we
help to propagate multiplicity.We should only support the slash and
NOT the backslash across ALL OS's since the slash is more widely
accepted. If an OS does not have the capability to support only the
slash then that OS is not worthy of a Python builtin module. The users
of such OS will be responsible for managing their OWN os_legacy.path
module. We are moving forward. Those who wish to wallow in the past
will be left behind.
major operating system family as well (I know Windows will accept a
forward slash in some contexts, but I'd be pretty surprised if one could
completely replace the backslash with it completely)? Interesting.
* Introduce a new method named "partition" which (along with stringSo these pretty specifically named functions (except perhaps split)
splitting methods) will replace the six methods "basename", "dirname",
"split", "splitdrive", "splitunc", "splittext". The method will return
a tuple of the path split into four parts: (drive, path, filename,
extension). This is the ONLY splitting method this module needs. All
other splits can use string methods.
should be replaced with one ambiguously named one? Interesting.
- dirname --> os.path.join(drive,path)Now you've stopped making sense completely. Also interesting.
* split --> split what?I actually agree with you on these, which I suppose is interesting.
...
os.path.exists(path, ignoreSymLnks=False)
--
CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0
PGP/GPG Public Key ID: 0xF88E034060A78FCB
.
- Follow-Ups:
- Re: PyWart: os.path needs immediate attention!
- From: Steven D'Aprano
- Re: PyWart: os.path needs immediate attention!
- From: harrismh777
- Re: PyWart: os.path needs immediate attention!
- References:
- PyWart: os.path needs immediate attention!
- From: rantingrick
- PyWart: os.path needs immediate attention!
- Prev by Date: Re: Another win for profiling.
- Next by Date: Re: PEP 8 and extraneous whitespace
- Previous by thread: PyWart: os.path needs immediate attention!
- Next by thread: Re: PyWart: os.path needs immediate attention!
- Index(es):
Relevant Pages
|