# # note: this file was made by cut-and-paste off the screen; # else stderr for stack trace may show up before all else # [mark@toy ~/PP2ndEd/dev/examples/Part3/Embed/Inventory]$ python order-bytecode.py 0 (111, 2, 'GRossum') errors: none warnings: none {111: 8, 222: 5, 444: 100, 555: 1} ['GRossum', 'JOusterhout', 'LWall'] 1 (222, 5, 'LWall') errors: none warnings: reorder-soon:222 {111: 8, 222: 0, 444: 100, 555: 1} ['GRossum', 'JOusterhout', 'LWall'] 2 (333, 3, 'JOusterhout') errors: bad-product warnings: none {111: 8, 222: 0, 444: 100, 555: 1} ['GRossum', 'JOusterhout', 'LWall'] 3 (222, 1, '4Spam') errors: buyer-name:4 check-quantity warnings: new-buyer-added {111: 8, 222: 0, 444: 100, 555: 1} ['GRossum', 'JOusterhout', 'LWall', '4Spam'] 4 (222, 0, 'LTorvalds') error in embedded code: type = exceptions.ZeroDivisionError data = integer division or modulo trace = File "order-bytecode.py", line 15, in ? exec script in names, names File "validate1.py", line 25, in ? validate_order() File "validate1.py", line 16, in validate_order if inventory.stock(PRODUCT) / QUANTITY < 2: 5 (444, 9, 'ERaymond') errors: none warnings: new-buyer-added {111: 8, 222: 0, 444: 91, 555: 1} ['GRossum', 'JOusterhout', 'LWall', '4Spam', 'LTorvalds', 'ERaymond']