Commits

Silas Baronda committed ef0f878

* isolated message and queue

Comments (0)

Files changed (2)

+import datetime
+class Message:
+  def __init__(self, body):
+    self.body = body
+    self.created = datetime.datetime.now()
+
   def pop(self):
     return self.queue.pop()
   def __str__(self):
-    return self.name
-
-class Message:
-  def __init__(self, body):
-    self.body = body
-    self.created = datetime.datetime.now()
+    return self.name + " " + str(self.queue)
 
 if __name__ == '__main__':
+  from message import Message
   queue = Queue("My_Queue")
   m = Message("This is a message")