| LEFT | RIGHT |
| 1 from test.test_support import verbose, TESTFN | 1 from test.test_support import verbose, TESTFN |
| 2 import random | 2 import random |
| 3 import os | 3 import os |
| 4 | 4 |
| 5 # From SF bug #422121: Insecurities in dict comparison. | 5 # From SF bug #422121: Insecurities in dict comparison. |
| 6 | 6 |
| 7 # Safety of code doing comparisons has been an historical Python weak spot. | 7 # Safety of code doing comparisons has been an historical Python weak spot. |
| 8 # The problem is that comparison of structures written in C *naturally* | 8 # The problem is that comparison of structures written in C *naturally* |
| 9 # wants to hold on to things like the size of the container, or "the | 9 # wants to hold on to things like the size of the container, or "the |
| 10 # biggest" containee so far, across a traversal of the container; but | 10 # biggest" containee so far, across a traversal of the container; but |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 try: | 282 try: |
| 283 print(dict[Machiavelli3(2)], file=f) | 283 print(dict[Machiavelli3(2)], file=f) |
| 284 except KeyError: | 284 except KeyError: |
| 285 pass | 285 pass |
| 286 finally: | 286 finally: |
| 287 f.close() | 287 f.close() |
| 288 os.unlink(TESTFN) | 288 os.unlink(TESTFN) |
| 289 | 289 |
| 290 del dict | 290 del dict |
| 291 del dict1, dict2, dict1keys, dict2keys | 291 del dict1, dict2, dict1keys, dict2keys |
| LEFT | RIGHT |