8
votes
Accepted
Virtual machine using RPython and PyPy
bcode = []
stack = []
regs = []
sp = 0
bcd = []
Global variables like this are frowned upon. To be pythonic you should really put them a in a class or something.
...
5
votes
Virtual machine using RPython and PyPy
You need to close files you've open. From the Python doc :
When you’re done with a file, call f.close() to close it and free up
any system resources taken up by the open file.
Even better, you ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 2rpython × 2
performance × 1
python-2.x × 1
primes × 1
sieve-of-eratosthenes × 1
interpreter × 1