This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年06月15日 12:40 by Łukasz.Balcerzak, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| abspath-with-joins.diff | Łukasz.Balcerzak, 2013年06月15日 12:40 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg191203 - (view) | Author: Łukasz Balcerzak (Łukasz.Balcerzak) * | Date: 2013年06月15日 12:40 | |
In projects I work on I constantly end up creating something like: abspath = lambda *p: os.path.abspath(os.path.join(*p)) This could be easily avoided by allowing abspath to accept multiple arguments. This would be: 1. Backward compatibile (calls with single argument would remain the same) 2. Very simple to fix (just join given path parts before doing anything else) I can document this, do most of the coding and test on Mac and linux, however would not be able to test on other platforms. Let me know if this is acceptable. Attaching a diff with posixpath update. |
|||
| msg191206 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2013年06月15日 13:49 | |
I'm -1 on this. It doesn't make sense to me to conflate two functions like that. If you need that functionality often in your application, just write a small helper function. |
|||
| msg191207 - (view) | Author: Łukasz Langa (lukasz.langa) * (Python committer) | Date: 2013年06月15日 14:00 | |
Would you expect to make the following also accept a sequence of path elements? - normpath, realpath, relpath - dirname - exists, lexists - expanduser, expandvars - isdir, isfile, islink - getsize, etc. I agree with R. David's sentiment. Moreover, relpath takes an optional second argument which would make this change backward incompatible. |
|||
| msg191608 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2013年06月21日 20:26 | |
Ditto, for reasons given |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:46 | admin | set | github: 62422 |
| 2013年07月05日 07:33:19 | ezio.melotti | set | stage: resolved |
| 2013年06月21日 20:26:09 | terry.reedy | set | status: open -> closed nosy: + terry.reedy messages: + msg191608 resolution: rejected |
| 2013年06月15日 14:00:28 | lukasz.langa | set | nosy:
+ lukasz.langa messages: + msg191207 versions: - Python 3.5 |
| 2013年06月15日 13:49:24 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg191206 |
| 2013年06月15日 12:40:14 | Łukasz.Balcerzak | create | |