[Patches] [ python-Patches-1337876 ] Inconsistent use of buffer interface in string and unicode

SourceForge.net noreply at sourceforge.net
Mon Oct 31 18:24:07 CET 2005


Patches item #1337876, was opened at 2005-10-25 22:38
Message generated for change (Comment added) made by philthompson10
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1337876&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Phil Thompson (philthompson10)
Assigned to: Nobody/Anonymous (nobody)
Summary: Inconsistent use of buffer interface in string and unicode

Initial Comment:
String and unicode objects allow objects that  
implement the buffer interface to be used in  
method arguments where a string is expected in  
most cases - but it's not completely consistent.  
  
Examples where the buffer interface is ignored  
include all the strip methods, the format  
methods, the just methods (for strings but  not 
unicode) and the "in" operator (for strings but not 
unicode). 
 
The attached patch implements the missing 
bits. 

----------------------------------------------------------------------

>Comment By: Phil Thompson (philthompson10)
Date: 2005-10-31 17:24

Message:
Logged In: YES 
user_id=1105728

I don't think any doc updates are necessary. Those 
methods that don't need fixing don't have any 
documentation that is specific to objects that 
implement the buffer interface. 
 
Likewise for tests. I couldn't find any existing tests for 
objects that implement the buffer interface - maybe 
because the core doesn't include any objects that 
can be tested. 

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-31 04:03

Message:
Logged In: YES 
user_id=33168

Are there any doc updates necessary?  If so that should be
included in the patch.
Tests need to be added to verify objects that implement the
buffer interface works for all affected code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1337876&group_id=5470


More information about the Patches mailing list