From ce4d0fcd9e19ebf902c993d379de770ca5b16e25 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 10 Jan 2013 23:11:45 -0800 Subject: [PATCH] expose contains method (fixes infinite recursion in py3k) --- bindings/python/mapnik_feature.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/mapnik_feature.cpp b/bindings/python/mapnik_feature.cpp index 31e0434b4..0c7e6745e 100644 --- a/bindings/python/mapnik_feature.cpp +++ b/bindings/python/mapnik_feature.cpp @@ -225,6 +225,7 @@ void export_feature() .def("has_key", &Feature::has_key) .add_property("attributes",&attributes) .def("__setitem__",&__setitem__) + .def("__contains__",&__getitem__) .def("__getitem__",&__getitem__) .def("__getitem__",&__getitem2__) .def("__len__", &Feature::size)