In section "Flexible Data Types":
'
The following code snip assigns the scene objects (retrieved from the game engine) to variables named after their names.
(...)
for object in scene.objects:
exec("%s = \"object\" " % (object.name))
'
The last line should be:
exec("%s = object" % (object.name))
UPBGE Manual » Python Scripting » Introduction to Scripting https://upbge.org/manual/manual/python/introduction.html
In section "Flexible Data Types": ' The following code snip assigns the scene objects (retrieved from the game engine) to variables named after their names.
' The last line should be:
exec("%s = object" % (object.name))