Comments on: python grmph http://blodgett.doof.me.uk/2011/05/27/python-grmph/ place of blodgett Mon, 30 May 2011 11:01:32 +0000 hourly 1 https://wordpress.org/?v=5.4.2 By: blodgett http://blodgett.doof.me.uk/2011/05/27/python-grmph/comment-page-1/#comment-2630 Mon, 30 May 2011 11:01:32 +0000 http://blodgett.doof.me.uk/?p=1926#comment-2630 transparency not python strong suit rly

]]>
By: cakesniffer http://blodgett.doof.me.uk/2011/05/27/python-grmph/comment-page-1/#comment-2628 Sun, 29 May 2011 18:41:24 +0000 http://blodgett.doof.me.uk/?p=1926#comment-2628 On second thoughts, that isn’t actually supported by the above example. Maybe it doesn’t make sense.

]]>
By: cakesniffer http://blodgett.doof.me.uk/2011/05/27/python-grmph/comment-page-1/#comment-2627 Sun, 29 May 2011 15:01:21 +0000 http://blodgett.doof.me.uk/?p=1926#comment-2627 Does sort of: it’s caching immutable small int objects and handing you back a reference to an existing one rather than creating loads of separate objects for every “1”. Then it pre-fills the cache with -5..255 which are presumably the most common.

]]>
By: doik http://blodgett.doof.me.uk/2011/05/27/python-grmph/comment-page-1/#comment-2624 Sat, 28 May 2011 19:53:06 +0000 http://blodgett.doof.me.uk/?p=1926#comment-2624 that sort of even makes sense maybe. this does not:

>>> a = -5

>>> b = -5

>>> a is b

True

>>> a = -6

>>> b = -6

>>> a is b

False

>>> a = -6; b = -6

>>> a is b

True

]]>