News for hackers. Stuff that matters.
Re:The switch: Python to Node.js by sneak on Sunday December 18, 2011 @12:08PM (#3366963)
Were it that Python was my livelihood my life would be a lot simpler. Instead, my livelihood comes from unfucking bad decisions like "hey, let's use PHP!" or "hey, let's rewrite the whole thing in javascript and use node!" or "MongoDB seems great, let's switch from MySQL!"

It's not fear of new, it's fear of broken. I encourage you to use whatever shiny stack-of-the-month you enjoy, as it basically amounts to my competitive advantage over people like that. I'll be over here using Apache and nginx and MySQL and python and perl and other languages that don't make me write abominations like '==!', same way I have forever. Best of luck to you.

Re:The switch: Python to Node.js by dtf on Sunday December 18, 2011 @09:36PM (#3368231)
>>> a = 100; b = 100; print (a is b)

True

>>> a = 1000; b = 1000; print (a is b)

True

>>> a = 1000

>>> b = 1000

>>> print (a is b)

False

Python has its quirks too. Most people learn them and get over it.

Re:The switch: Python to Node.js by zeemonkee on Monday December 19, 2011 @03:44AM (#3368992)
This might be a good explanation for this behavior:

http://stackoverflow.com/questions/2858603/why-is-keyword-ha...

tl;dr; use "is" only with singetons (None etc)

Re:The switch: Python to Node.js by sneak on Monday December 19, 2011 @10:57AM (#3369976)
I have never once used the 'is' keyword in python.
Re:The switch: Python to Node.js by dtf on Monday December 19, 2011 @03:50PM (#3371084)
Have you ever tested for a None value?

    if foo is None:
      return

    if bar is not None:
      bar()