But I don't really know how to write idiomatic code. Is anyone here willing to rewrite some of my python code, so I can see how it's done?
Also, what is the code-tag on this board?
Name:
OP2013-03-21 18:24
Here are a few things I'm interested in specifically:
How do I attach metadata to a function that can be read without calling the function. (but don't prevent the function to be called in the usual way.)
By using for i, (op, jtype) in enumerate(itertools.product(numops, jnumtypes)): I avoid nesting two loops and adding a counter-variable. What do lisp-people use here?
For pretty-printing I make sure that the opcodes have a proper name, and that certain ints are printing together with the role they have (like ConstantIndexOperand). Is there a way to define how certain objects are serialized/pretty-printed in scheme?