from example import Connection
class MyLibrary:
def __init__(self, host, port=80):
self._conn = Connection(host, int(port))
def send_message(self, message):
self._conn.send(message)
from example import Connection
class MyLibrary:
def __init__(self, host, port=80):
self._conn = Connection(host, int(port))
def send_message(self, message):
self._conn.send(message)
Hi Teja,
where did you get that example? I believe it might be just a fictional example to convey the concept not an actual example?
On pypi there are lots of modules called “example” but I don’t know if any of them have the “Connection” class.
Dave.