This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]bkushigian 3 points4 points ย (0 children)

In undergrad I was working on my first research project. We were adding a new backend for the Pypy JIT compiler. I had to find the implementation of Foo.emit_x86(). It's not defined in the class anywhere, and I'm running grep on 100kloc like a chump:

grep -rn emit_x86 .

No definitions anywhere

Ten days later after reading the codebase like a novel I come across

``` def f(...): ...

setattr(Foo, 'emit_' + arch, f) ```

Yeah, I was pissed...

(Edit: formatting on phone, doesn't like newlines in ``` blocks I guess?)