Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
bpo-44712: Replace "type(literal)" with corresponding builtin types#27294
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
a1d6302aa093403cc4c5caad7189b04e49795b43acd131d70File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -6,6 +6,9 @@ | ||
| class C: | ||
| pass | ||
| def pickle_C(c): | ||
| return C, () | ||
| class WithoutSlots(object): | ||
| pass | ||
| @@ -32,16 +35,15 @@ class WithInherited(WithSingleString): | ||
| class CopyRegTestCase(unittest.TestCase): | ||
| def test_class(self): | ||
| self.assertRaises(TypeError, copyreg.pickle, | ||
| C, None, None) | ||
| copyreg.pickle(C, pickle_C) | ||
terryjreedy marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| def test_noncallable_reduce(self): | ||
| self.assertRaises(TypeError, copyreg.pickle, | ||
| type(1), "not a callable") | ||
| C, "not a callable") | ||
terryjreedy marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| def test_noncallable_constructor(self): | ||
| self.assertRaises(TypeError, copyreg.pickle, | ||
| type(1), int, "not a callable") | ||
| C, pickle_C, "not a callable") | ||
terryjreedy marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| def test_bool(self): | ||
| import copy | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -203,7 +203,7 @@ def test_knotted(self): | ||
| def test_unreadable(self): | ||
| # Not recursive but not readable anyway | ||
| pp = pprint.PrettyPrinter() | ||
| for unreadable in type(3), pprint, pprint.isrecursive: | ||
| for unreadable in object(), int, pprint, pprint.isrecursive: | ||
terryjreedy marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| # module-level convenience functions | ||
| self.assertFalse(pprint.isrecursive(unreadable), | ||
| "expected not isrecursive for %r" % (unreadable,)) | ||
Uh oh!
There was an error while loading. Please reload this page.