title: Working with Object() between files Python
body: <p>Situation: Given that I have a <code>queueA</code> declared in <code>fileA</code>,</p>
  
  <pre><code>fileA.py
  end_queue = Object()
  queueA = Queue.queue()
  
     queueA
  | value123  | &lt;-- front of the queue
  | value234  |
  | value345  |
  | value456  | &lt;-- final value put into queue
  | end_queue | &lt;-- end_queue object to denote the end of queue
  </code></pre>
  
  <p>in <code>fileB</code>,</p>
  
  <pre><code>import fileA
  
  while True:
      string = fileA.queueA.get()
  
      if string is end_queue:
          break
  
      #rest of the code...
  </code></pre>
  
  <p>Problem: The above code produces the following error:</p>
  
  <pre><code>TypeError: coercing to Unicode: need string or buffer, object found
  </code></pre>
  
  <p>Question: I do know that this means I am trying to do a string/buffer operation on an <code>Object()</code> object. However, how do I check if the input is an <code>Object()</code> or <code>end_queue</code>.</p>