Simulating simple electric circuits

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Tue May 15 07:55:43 EDT 2007


Bjoern Schliessmann wrote:

> class Source(object):

Little bug: The __init__ method of class Source should look like
this.

def __init__(self, ID, neighbour = None):
    self.connections = []
    self.ID = ID
    if neighbour: self.connections.append(neighbour)

Regards,


Björn

-- 
BOFH excuse #102:

Power company testing new voltage spike (creation) equipment




More information about the Python-list mailing list