[issue31240] Add lazy evaluation support for dict.setdefault()

2017-08-19 Thread Jim Dennis
New submission from Jim Dennis: Code such as mydict.setdefault('eggs', []) will needlessly incur the cost of instantiating a list even when 'eggs' is already a valid key in mydict. collections.defaultdict will not do this. detecting and automatically calling "cal

[issue5824] SocketServer.DatagramRequestHandler Broken under Linux

2009-04-23 Thread Jim Dennis
Jim Dennis added the comment: Addendum: What I said about the default sendto() in finish() causing a loop in server_forever() was wrong. I'd seen that behavior in an experimental variation of the code. The exceptions raised (and deficiencies in documentation) are the

[issue5824] SocketServer.DatagramRequestHandler Broken under Linux

2009-04-23 Thread Jim Dennis
New submission from Jim Dennis : .../lib/python2.*/SocketServer.py in class DatagramRequestHandler contains the following comment: # XXX Regrettably, I cannot get this working on Linux; # s.recvfrom() doesn't return a meaningful client address. This is a poor way to documen