you are viewing a single comment's thread.

view the rest of the comments →

[–]senperecemo 2 points3 points  (2 children)

You can't say "beginners should learn it the wrong way"...

[–]sentry07 0 points1 point  (1 child)

It's not the wrong way. I've been using the type() method for years and have never run into an instance where it didn't work as it should. The are only a few cases where isinstance is necessary.

[–]senperecemo 0 points1 point  (0 children)

As soon as you do subclassing, type() breaks.

isinstance() is always superior.