I am very new to python.I am working with some python code.I am trying to map the python object oriented concepts to those of C++ which I think is a good way to learn.I can across two types of class definitions.
class SourcetoPort(Base):
""""""
__tablename__ = 'source_to_port'
id = Column(Integer, primary_key=True)
port_no = Column(Integer)
src_address = Column(String)
#----------------------------------------------------------------------
def __init__(self, src_address,port_no):
""""""
self.src_address = src_address
self.port_no = port_no
and the second one.
class Tutorial (object):
def __init__ (self, connection):
print "calling Tutorial __init__"
self.connection = connection
connection.addListeners(self)
self.mac_to_port = {}
self.matrix={}
I want to know what is the difference between the Base in SourcetoPort and object in Tutorial?