(self, obj, output)
Tries to write an object reference, adding it to the references
           table. Does not write the actual object bytes or set the reference
           position. Returns a tuple of whether the object was a new reference
           (True if it was, False if it already was in the reference table)
           and the new output.
Tries to write an object reference, adding it to the references
           table. Does not write the actual object bytes or set the reference
           position. Returns a tuple of whether the object was a new reference
           (True if it was, False if it already was in the reference table)
           and the new output.
Tries to write an object reference adding it to the references table . Does not write the actual object bytes or set the reference position . Returns a tuple of whether the object was a new reference ( True if it was False if it already was in the reference table ) and the new output .
def writeObjectReference(self, obj, output):
        """Tries to write an object reference, adding it to the references
           table. Does not write the actual object bytes or set the reference
           position. Returns a tuple of whether the object was a new reference
           (True if it was, False if it already was in the reference table)
           and the new output.
        """
        position = self.positionOfObjectReference(obj)
        if position is None:
            self.writtenReferences.append(obj)
            output += self.binaryInt(len(self.writtenReferences) - 1, bytes=self.trailer.objectRefSize)
            return (True, output)
        else:
            output += self.binaryInt(position, bytes=self.trailer.objectRefSize)
            return (False, output)
def writeObjectReference ( self , obj , output ) : position = self . positionOfObjectReference ( obj ) if position is None : self . writtenReferences . append ( obj ) output += self . binaryInt ( len ( self . writtenReferences ) - 1 , bytes = self . trailer . objectRefSize ) return ( True , output ) else : output += self . binaryInt ( position , bytes = self . trailer . objectRefSize ) return ( False , output )