[Mobies-commit] [commit] r3740 - UDM/trunk/src/UdmPython

ksmyth at redhat1.isis.vanderbilt.edu ksmyth at redhat1.isis.vanderbilt.edu
Fri May 13 16:19:07 CDT 2011


Author: ksmyth
Date: Fri May 13 16:19:07 2011
New Revision: 3740

Log:
udm.Object.__nonzero__

Modified:
   UDM/trunk/src/UdmPython/UdmPython.cpp

Modified: UDM/trunk/src/UdmPython/UdmPython.cpp
==============================================================================
--- UDM/trunk/src/UdmPython/UdmPython.cpp	Fri May 13 16:18:17 2011	(r3739)
+++ UDM/trunk/src/UdmPython/UdmPython.cpp	Fri May 13 16:19:07 2011	(r3740)
@@ -525,6 +525,7 @@
 	scope().attr("Object").attr("children") = eval("lambda self, child_role=None, parent_role=None, child_type=None: self._children(child_role, parent_role, child_type)");
 	scope().attr("Object").attr("set_adjacent") = eval("lambda self, targets, src_role=None, dst_role=None, association_class=None: self._set_adjacent(targets, src_role, dst_role, association_class)");
 	scope().attr("Object").attr("__repr__") = eval("lambda self: \"udm.null\" if self.id==0 else (\"<udm.Object id\" + str(self.id) + \">\")");
+	scope().attr("Object").attr("__nonzero__") = eval("lambda self: self.id != 0");
 
 	scope().attr("null") = Udm::null;
 


More information about the Mobies-commit mailing list