best practice for a script dict location in the api ?

hello,
I’m diving into the (marvellous, jaw dropping, unbelievable) 2.5 api since some days, and was wondering where are the best ‘locations’ to create dictionnaries, custom variables etc.

I would need a main dict available from different script ui / methods / maybe from BGE too. so I suppose it could be better to locate it in a common ‘location’ (how would you say that in real english ??)

should I create it in a special object as a property with smtg like :

main = bpy.data.objects['Empty']
main['vars']={ 'foo':10 , 'buildings':{} }

or in bpy.data like in this example :
http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro#Custom_Properties


group = bpy.data.groups.new("MyTestGroup")
group["GameSettings"] = {"foo": 10, "bar": "spam", "baz": {}}

I’m surprised by the data.groups ‘location’ of the dict used in this example, since ‘MyTestGroup’ won’t show up in the ui and that

list(bpy.data.groups)

will also lists the groups created in the ui (properties panel / object / Groups/ +)

… or any other ways ?

thanks