Is it possible to replace the lambda functions in irclib.py (line 221 if i remember well) by something more readable ? the lambda functions will be deprecated in next versions of python.
def process_once(self, timeout=0):
need_sleep = True
for connection in self.connections :
if connection._get_socket() != None :
need_sleep = False
i, o, e = select.select(sockets, [], [], timeout)
self.process_data(i)
if need_sleep :
time.sleep(timeout)
self.process_timeout()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't see why not. Perhaps something like this?
Yikes... that sucked out all my indenting. Well, you get the idea.
how about replace the two initial lines,
sockets = map(...)
sockets = filter(...)
with:
sockets = [conn.get_socket() for conn in self.connections if conn.get_socket() != None]
These are good suggestions, and as the code evolves, I will consider improvements such as these.