Patches item #1414934, was opened at 2006-01-25 15:52 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1414934&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: Collin Winter (collinwinter) Assigned to: Nobody/Anonymous (nobody) Summary: Patch for bug #1380970 Initial Comment: The split and rsplit methods for both string and unicode types currently do not live up to their documentation. The docs say (quoting from docs.python.org/dev): """ If sep is not specified or is None, a different splitting algorithm is applied. First, whitespace characters (spaces, tabs, newlines, returns, and formfeeds) are stripped from both ends. """ As of svn revision 42185, these methods only strip whitespace from one end. The attached patch makes all four methods (str.split, str.rsplit, unicode.split, unicode.rsplit) remove whitespace from both ends of the string. The patch also modifies Lib/test/string_tests.py to add checks for this to the regression suite. The patch passes the full regression suite. PS: if I could get a review of patch #1412451, that would be smashing. Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1414934&group_id=5470 _______________________________________________ Patches mailing list [email protected] http://mail.python.org/mailman/listinfo/patches
