How can to find out if foo is an instance of class Bar
|
| View previous topic :: View next topic |
| Author |
Message |
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| How can I find out if foo is an instance of class Bar? |
| |
|
|
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| isinstance(foo, Bar) |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| thanks |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| but does it matter if it isn't? |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| yep |
| |
|
|
|
|