[Tutor] Test for type(object) == ???

Steven D'Aprano steve at pearwood.info
Sat Feb 11 05:27:08 EST 2017


On Sat, Feb 11, 2017 at 01:00:11PM +1100, Ben Finney wrote:
> boB Stepp <robertvstepp at gmail.com> writes:
> 
> > I was playing around with type() tonight.  If I type (pun intended), I get:
> >
> > py3: type(5)
> > <class 'int'>
> 
> Ceci n'est pas un ‘int’.
[...]
> <URL:https://en.wikipedia.org/wiki/The_Treachery_of_Images>


For anyone interested in this concept and how it relates to programming, 
and many other mind-expanding concepts, I cannot recommend enough the 
famous book 

Gödel, Escher, Bach: An Eternal Golden Braid

by Douglas Hofstadter. It is a mighty tome, but don't be put off by the 
size and weight. It covers some *extremely* subtle concepts, but it 
works up to them in baby steps, with the aid of dialogs between 
Archilles and the Tortoise.

-- 
Steve


More information about the Tutor mailing list