Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path.extname('.a.a')!='' #27292

Closed
anliting opened this issue Apr 18, 2019 · 3 comments
Closed

path.extname('.a.a')!='' #27292

anliting opened this issue Apr 18, 2019 · 3 comments
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. path Issues and PRs related to the path subsystem.

Comments

@anliting
Copy link

anliting commented Apr 18, 2019

According to the documentation for path.extname(path):

If there is no . in the last portion of the path, or if the first character of the basename of path (see path.basename()) is ., then an empty string is returned.

path.basename('.a.a')[0]=='.' and path.extname('.a.a')!='' should not happen at the same time.

@BridgeAR BridgeAR added doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. path Issues and PRs related to the path subsystem. labels Apr 18, 2019
@BridgeAR
Copy link
Member

This seems to be an issue with our documentation and it should be updated to reflect that it will only return an empty string in case the first character is a dot and it is also the only dot returned by path.basename.

@anliting
Copy link
Author

anliting commented Apr 18, 2019

I would describe it like this:

If there are no dots after the first character, an empty string is returned.

@himself65
Copy link
Member

Landed in 290faec

pls close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. path Issues and PRs related to the path subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants