git @ Cat's Eye Technologies SixtyPical / 3fd7e52
Reduce number of errors under Python 3 another smidge. Chris Pressey 3 years ago
3 changed file(s) with 9 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 #!/usr/bin/env python
0 #!/usr/bin/env python3
11
22 """Usage: sixtypical [OPTIONS] FILES
33
171171
172172 @classmethod
173173 def format_set(cls, location_refs):
174 return '{%s}' % ', '.join([str(loc) for loc in sorted(location_refs)])
174 return '{%s}' % ', '.join([str(loc) for loc in sorted(location_refs, key=lambda x: x.name)])
175175
176176
177177 class IndirectRef(Ref):
20002000 A trashed value that has been saved can be used inside the block.
20012001 It will continue to be trashed outside the block.
20022002
2003 (Note, both x and a are unmeaningful in this test.)
2004
20032005 | routine main
20042006 | inputs a
20052007 | outputs a, x
20122014 | ld x, 1
20132015 | }
20142016 | }
2015 ? UnmeaningfulOutputError: x
2017 ? UnmeaningfulOutputError
20162018
20172019 The known range of a value will be preserved outside the block as well.
20182020
22712273 | }
22722274 ? ForbiddenWriteError: lives
22732275
2274 a, z, and n are trashed, and must be declared as such
2276 a, z, and n are trashed, and must be declared as such.
2277
2278 (Note, both n and z are forbidden writes in this tests.)
22752279
22762280 | byte lives
22772281 | routine main
22792283 | {
22802284 | copy 0, lives
22812285 | }
2282 ? ForbiddenWriteError: n
2286 ? ForbiddenWriteError
22832287
22842288 a, z, and n are trashed, and must not be declared as outputs.
22852289