def connect(self):
        if [INIT, DISCONNECTED] not in self.state:
            return

        self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.socket.settimeout(self.timeout)
        self.socket.setblocking(0)

        self.stream = tornado.iostream.IOStream(self.socket, io_loop=self.io_loop)
        self.stream.set_close_callback(self._socket_close)

        self.state = CONNECTING
        self.on(event.CONNECT, self._on_connect)
        self.on(event.DATA, self._on_data)

        self.stream.connect((self.host, self.port), self._connect_callback)
dataset/ETHPy150Open nsqio/pynsq/nsq/async.py/AsyncConn.connect/swapped operands of `not in`