On 03/06/2015 17:29, Mark Lawrence wrote:
On 03/06/2015 17:00, BartC wrote:
On 03/06/2015 13:08, Marko Rauhamaa wrote:
BartC <b...@freeuk.com>:
To 'variable' and 'type', you might need to add 'value' to make it more
complete.
'Value' and 'object' are indeed synonymous as long as you keep in mind
that:
>>> -12 == -12
True
>>> -12 is -12
False
IOW, the literal expression -12 happens to construct a fresh
value/object each time CPython parses it.
That's a different matter. However, you appear to be wrong.
print (-12 is -12)
gives True.
No, you don't understand how cPython does things.
Do I need to understand CPython to appreciate what difference there
might be between variables, values and objects?
Does anyone need to understand CPython for anything?
--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list