Uh oh!
There was an error while loading. Please reload this page.
bpo-44712: Replace "type(literal)" with corresponding builtin types - #27294
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| mtime = int(mtime) | ||
| else: | ||
| mtime = int(-0x100000000 + int(mtime)) | ||
| mtime = int(mtime) |
There was a problem hiding this comment.
This and the next seem like different types of changes.
There was a problem hiding this comment.
This is a very old code, written when time could be int. It is complicated and not completely correct.
This change is included in #19708, so it will be removed from this PR.
bedevere-bot
commented
Jul 23, 2021
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be put in the comfy chair! |
terryjreedy
commented
Jul 23, 2021
The type(x) replacements are a real improvement in readability. Consider removing other changes while adding a few ==/!= replacements with is/is not. |
Uh oh!
There was an error while loading. Please reload this page.
This PR is stale because it has been open for 30 days with no activity. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| mtime = int(mtime) | ||
| else: | ||
| mtime = int(-0x100000000 + int(mtime)) | ||
| mtime = int(mtime) |
There was a problem hiding this comment.
This is a very old code, written when time could be int. It is complicated and not completely correct.
This change is included in #19708, so it will be removed from this PR.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
ronaldoussoren
left a comment
There was a problem hiding this comment.
The changes to plistlib and build-installer.py look good to me.
Likewise for most other changes. This does change type checks from (effectively) type(value) is some_type to instance(value, some_type) and those are technically semantic changes. That said, the changes should have no visible behaviour change in practice.
I didn't look at the changes in tkinter, pydoc and xmlrpc, mostly due to lack of time: I didn't have to time to look deeply enough at the code to see if there are unexpected changes in behaviour.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
https://bugs.python.org/issue44712
#88878