GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — gh-125633: Add function `ispackage` to stdlib `inspect` by Xiaokang2022 · Pull Request #125634 · python/cpython Conversation
|
|
Please add a unittest and document. Also add to 3.14 what's new(recommend) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One of the tests is currently failing because you also need to add the new test folder to the Makefile: Line 2500 in 7b04496
should be: test/test_inspect \
+ test/test_inspect/inspect_simple_pkg \ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ispackage to stdlib inspectispackage to stdlib inspect
|
LGTM |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@brettcannon @ncoghlan: Is it the correct way to check if a module a package, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Several comments :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I'm not sure Edit: after checking the This also keeps things consistent with the glossary's definition of a package as a module with a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the PR @Xiaokang2022, and thanks for the prior reviews all! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.istest(inspect.ispackage, 'importlib') | ||
| self.assertFalse(inspect.ispackage(inspect)) | ||
| self.assertFalse(inspect.ispackage(mod)) | ||
| self.assertFalse(inspect.ispackage(':)')) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This last test genuinely made me laugh :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…#125634) --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.