Moved in MergeDicts. master
Moved in MergeDicts.
Added .gitignore.

file:b/.gitignore (new)
--- /dev/null
+++ b/.gitignore
@@ -1,1 +1,4 @@
+__pycache__
+.project
+.pydevproject
 

file:a/Modular.py -> file:b/Modular.py
--- a/Modular.py
+++ b/Modular.py
@@ -8,9 +8,20 @@
 

 __all__ = ['Component', 'ModularType', 'Modular', 'Node']

 

-from _tools import merge_dicts

 from sys import modules

 from collections import OrderedDict

+

+def MergeDicts(*dicts):

+	r = {}

+	for d in dicts:

+		for k, v in d.items():

+			if k not in r:

+				r[k] = v

+			elif isinstance(r[k], dict) and isinstance(v, dict):

+				r[k] = MergeDicts(r[k], v)

+			else: r[k] += v

+	

+	return r

 

 class ModularType(type):

 	subclasses = {}

@@ -26,9 +37,9 @@
 			for module in classDict['moduleDepends']:

 				if module not in cls.DerivedValues:

 					cls.DerivedValues[module] = {}

-				cls.DerivedValues[module] = merge_dicts(cls.DerivedValues[module], {newClass: classDict['moduleDepends']})

+				cls.DerivedValues[module] = MergeDicts(cls.DerivedValues[module], {newClass: classDict['moduleDepends']})

 		if 'filter' in classDict:

-			cls.filter = merge_dicts(cls.filter, classDict['filter'])

+			cls.filter = MergeDicts(cls.filter, classDict['filter'])

 		if name not in cls.subclasses:

 			cls.subclasses[name] = newClass

 		_all = modules[newClass.__module__].__dict__.setdefault('__all__', [])

@@ -187,7 +198,7 @@
 		s = self._value

 		for child in self._container._Children.values():

 			if self.__classname__ in child._components:

-				s = merge_dicts(s, child._components[self.__classname__].getValue())

+				s = MergeDicts(s, child._components[self.__classname__].getValue())

 		return s

 	

 	def __str__(self):