Commits

German Larrain committed 4a9bb71

Simulation: improved docstrings of 'add_object'.

Comments (0)

Files changed (1)

ars/model/simulator/__init__.py

 		return actors
 
 	def add_object(self, sim_object):
-		"""Adds an object to the internal dictionary of simulated ones"""
+		"""Add ``sim_object`` to the internal dictionary of simulated objects.
+
+		If its name equals an already registered key, it will be modified
+		using its string representation, for example:
+
+		>>> sim.add_object(sim_object)
+		sphere/<ars.model.simulator.SimulatedBody object at 0x3a4bed0>
+
+		:param sim_object: object to add
+		:type sim_object: :class:`SimulatedObject`
+		:return: name/key of the object
+		:rtype: string
+
+		"""
 		name = sim_object.get_name()
 		if (name in self._objects.keys()) and name:
 			name = name + '/' + str(sim_object)