• About
  • Archive
  • RSS

code.dump();

Python integer gotcha

>>> a = 500
>>> b = 500
>>> a is b
False
>>> c = 200 >>> d = 200 >>> c is d True

“Can you surmise why this inconsistency happens?”

  • Posted by inky
  • Tags:
    • python
  • June 22, 2009, 11:04pm

  • Permalink
← Previous Post   Next Post →

About

A place for code snippets, keyboard shortcuts, dirty hacks and other fun tricks. Use at your own risk!

Members

  • inky
  • arood
  • beret
  • nosmo

Search

Colophon

A group tumblelog, originally by inky. Powered by Tumblr and themed by Bill Israel.