On Tue, Jul 5, 2016 at 3:05 PM, Alex Hall <ah...@autodist.com> wrote: > Hi all, > Thanks for all the help regarding decorators. It makes more sense now. > > I was double checking that I remembered the isinstance order of arguments > correctly by using the command line interpreter, and found something very > odd. > >>>> a = 5 >>>> isinstance(a, int) > True >>>> a is int > False > > What happened there? Don't these do the same thing? I thought I could use > them interchangeably? > > -- > Alex Hall > Automatic Distributors, IT department > ah...@autodist.com > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor
is denotes identity. 5 is not the type int. It is an int, but it is not the same -- if it was 5('16') would be 16. -- Joel Goldstick http://joelgoldstick.com/blog http://cc-baseballstats.info/stats/birthdays _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor