News for hackers. Stuff that matters.

mguillech

Re:Common Python Mistakes on Thursday May 08, 2014 @12:33PM (#7716158)
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
Re:Common Python Mistakes on Thursday May 08, 2014 @11:48AM (#7715912)
Please check out http://en.wikipedia.org/wiki/Late_binding to know more.
Re:Common Python Mistakes on Thursday May 08, 2014 @11:40AM (#7715857)
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).
Re:Common Python Mistakes on Thursday May 08, 2014 @11:35AM (#7715828)
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).
Re:Common Python Mistakes on Thursday May 08, 2014 @11:33AM (#7715808)
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.
Re:Algorithmic Trading: A Practical Tale for Engineers on Tuesday August 27, 2013 @02:01PM (#6285061)
Found it really interesting, I'm one of those that know nothing about FX, this has been very enlightening to me.
Re:Ask HN: What Freelancer site do you recommend? on Monday May 27, 2013 @06:16PM (#5776890)
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.