[Pybrainsim-activity] SF.net SVN: pybrainsim:[57] trunk/src/Generator.py
Status: Planning
Brought to you by:
rgoj
From: <rg...@us...> - 2009-08-03 12:40:27
|
Revision: 57 http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=57&view=rev Author: rgoj Date: 2009-08-03 11:20:21 +0000 (Mon, 03 Aug 2009) Log Message: ----------- * Generators now can't be created without a Head class to be attached to, because: ** the __init__ method now needs a Head object as input ** the __init__ method now adds the generator to the specified Head object * This makes the syntax to use Generators (e.g. in PyBrainSim.py) much, much nicer. Modified Paths: -------------- trunk/src/Generator.py Modified: trunk/src/Generator.py =================================================================== --- trunk/src/Generator.py 2009-08-03 11:14:11 UTC (rev 56) +++ trunk/src/Generator.py 2009-08-03 11:20:21 UTC (rev 57) @@ -22,9 +22,10 @@ """ class Generator: - def __init__(self, name): + def __init__(self, name, head): self.name = name self.activation = 0 + head.addGenerator(self) def printInfo(self): print(self.name + ": A Generator object") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |