New GitHub issue #117639 from nineteendo:<br>
<hr>
<pre>
# Feature or enhancement
### Proposal:
We could add a special case for the current directory and return it without normalising:
```diff
def abspath(path):
"""Return an absolute path."""
path = os.fspath(path)
if isinstance(path, bytes):
- if not path.startswith(b'/'):
- path = join(os.getcwdb(), path)
+ sep = b'/'
+ curdir = b'.'
+ getcwd = os.getcwdb
else:
- if not path.startswith('/'):
- path = join(os.getcwd(), path)
+ sep = '/'
+ curdir = '.'
+ getcwd = os.getcwd
+ if not path.startswith(sep):
+ if not path or path == curdir:
+ return getcwd()
+ path = join(getcwd(), path)
return normpath(path)
```
### Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
### Links to previous discussion of this feature:
- #117610
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/117639">View on GitHub</a>
<p>Labels: type-feature</p>
<p>Assignee: </p>