merge stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 07 Oct 2009 17:13:01 +0200
branchstable
changeset 3604 31cb1070bd43
parent 3603 9da934661d64 (current diff)
parent 3601 d77025be6f06 (diff)
child 3605 1466323ddb9c
merge
--- a/__init__.py	Wed Oct 07 17:12:40 2009 +0200
+++ b/__init__.py	Wed Oct 07 17:13:01 2009 +0200
@@ -123,7 +123,14 @@
         pass
 
     def create_entity(self, etype, *args, **kwargs):
-        """add a new entity of the given type"""
+        """add a new entity of the given type
+        
+        Example (in a shell session):
+
+        c = create_entity('Company', name='Logilab')
+        create_entity('Person', ('works_for', 'Y'), Y=c.eid, firstname='John', lastname='Doe')
+
+        """
         rql = 'INSERT %s X' % etype
         relations = []
         restrictions = []