[Python-checkins] CVS: python/dist/src/Lib asynchat.py,1.7,1.7.2.1
Moshe Zadka
moshez@users.sourceforge.net
Wed, 11 Apr 2001 01:06:04 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv17702/Lib
Modified Files:
Tag: release20-maint
asynchat.py
Log Message:
Inspired by Tim Peters' 1.14->1.15 checkin to asynchat
Quoting orignal message:
'''
Fix from the Madusa mailing list:
http://groups.yahoo.com/group/medusa/message/333
It's clear that Medusa should not be checking for an empty buffer
via "buf is ''". The patch merely changes "is" to "==". However,
there's a mystery here all the same: Python attempts to store null
strings uniquely, so it's unclear why "buf is ''" ever returned
false when buf actually was empty. *Some* string operations produce
non-unique null strings, e.g.
'''
Index: asynchat.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asynchat.py,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** asynchat.py 2000/09/08 20:30:39 1.7
--- asynchat.py 2001/04/11 08:06:02 1.7.2.1
***************
*** 167,171 ****
# this is about twice as fast, though not as clear.
return not (
! (self.ac_out_buffer is '') and
self.producer_fifo.is_empty() and
self.connected
--- 167,171 ----
# this is about twice as fast, though not as clear.
return not (
! (self.ac_out_buffer == '') and
self.producer_fifo.is_empty() and
self.connected