Skip to content

Commit e2e1432

Browse files
committed
Check class name directly
1 parent 609db8c commit e2e1432

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: mapscript/python/pyextend.i

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def fromstring(data, mappath=None):
8080
return self.toString()
8181

8282
def __contains__(self, item):
83-
item_type = str(type(item))
84-
if item_type == "<class 'mapscript.pointObj'>":
83+
item_type = item.__class__.__name__
84+
if item_type == "pointObj":
8585
if item.x >= self.minx and item.x <= self.maxx \
8686
and item.y >= self.miny and item.y <= self.maxy:
8787
return True

0 commit comments

Comments
 (0)