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


Groups > comp.lang.python > #62006 > unrolled thread

Re: Type of an object: ‘obj.__class__’ versus ‘type(obj)’

Started byChris Angelico <rosuav@gmail.com>
First post2013-12-16 16:09 +1100
Last post2013-12-16 16:09 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Type of an object: ‘obj.__class__’ versus ‘type(obj)’ Chris Angelico <rosuav@gmail.com> - 2013-12-16 16:09 +1100

#62006 — Re: Type of an object: ‘obj.__class__’ versus ‘type(obj)’

FromChris Angelico <rosuav@gmail.com>
Date2013-12-16 16:09 +1100
SubjectRe: Type of an object: ‘obj.__class__’ versus ‘type(obj)’
Message-ID<mailman.4180.1387170945.18130.python-list@python.org>
On Mon, Dec 16, 2013 at 3:50 PM, Ben Finney <ben+python@benfinney.id.au> wrote:
> Should we expect (ignoring pathological cases) the assertion
> ‘type(obj) is obj.__class__’ to hold true? If not, under what
> circumstances would it be sensible for those to differ?

By "pathological cases", do you mean arbitrarily changing
obj.__class__, or is there some other way for them to differ?

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web