Python caches modules imported, you can check it out in your local shell with: import sys ; sys.modules. That's why whenever you make changes to a module which has been already loaded you won't see the changes until you load the module again, either quitting the shell or using reload(module) on Python 2.x
HN user
mguillech
Please check out http://en.wikipedia.org/wiki/Late_binding to know more.
Right, it's (re) defined every time you call 'foo2' but that's a different scenario than the one written in the article (hadn't you had 'foo2' and only 'foo' then you'd have the same time in all your calls to the function without supplying arguments).
Agreed 100%, this type of constructions should be avoided in the first place in favor of more "readable" ones but this happens in a fair amount of code that I've seen (and I keep seeing).
That's right, in most Python implementations there's a "compiled" part (generally to bytecode) and then an "interpreted" one to run that bytecode. PyPy is a good example of a Python interpreter built on top of RPython (compiled with RPython, that is) adding a JIT to it.
Found it really interesting, I'm one of those that know nothing about FX, this has been very enlightening to me.
I work for toptal (http://www.toptal.com) and we're proud of having a very well selected network of developers (top-notch devs screening each other, our "let through" ratio is 1:10 approximately), that solely will rule out inexperienced devs so our customers are given nothing but the best. I'm open if you want to reach out.