Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101876

When is an int not an int? Who can explain this?

From "Charles T. Smith" <cts.private.yahoo@gmail.com>
Newsgroups comp.lang.python
Subject When is an int not an int? Who can explain this?
Date 2016-01-18 16:11 +0000
Organization A noiseless patient Spider
Message-ID <n7j2r0$hc4$1@dont-email.me> (permalink)

Show all headers | View raw


$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> type(0) is int
True
...
(PDB)type(0) is int
False
(PDB)type(1) is int
False

(PDB)p 5 + 0
5

(PDB)class c (object): pass
(PDB)type (c()) is c
True


Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

When is an int not an int?  Who can explain this? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-18 16:11 +0000
  Re: When is an int not an int? Who can explain this? Chris Angelico <rosuav@gmail.com> - 2016-01-19 03:19 +1100
    Re: When is an int not an int? Who can explain this? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-01-18 16:28 +0000
      Re: When is an int not an int? Who can explain this? Chris Angelico <rosuav@gmail.com> - 2016-01-19 03:51 +1100
      Re: When is an int not an int? Who can explain this? Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-18 10:00 -0700
      Re: When is an int not an int? Who can explain this? Random832 <random832@fastmail.com> - 2016-01-18 12:02 -0500
      Re: When is an int not an int? Who can explain this? Chris Angelico <rosuav@gmail.com> - 2016-01-19 04:35 +1100

csiph-web