Better HN
topnewbestaskshowjobs
Log inSign up

mguillech

5 karma · joined Feb 5, 2013 (13y ago) · 7 submissions

Submissions

comment 12y ago · link · parent

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

comment 12y ago · link · parent

Please check out http://en.wikipedia.org/wiki/Late_binding to know more.

comment 12y ago · link · parent

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).

comment 12y ago · link · parent

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).

comment 12y ago · link · parent

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.

comment 13y ago · link · parent

Found it really interesting, I'm one of those that know nothing about FX, this has been very enlightening to me.

comment 13y ago · link · parent

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.