[issue1538] Avoid string copy when split char doesn't match

2007-12-08 Thread Skip Montanaro
Skip Montanaro added the comment: In the absence of any more feedback, I checked this in as r59420. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1538] Avoid string copy when split char doesn't match

2007-12-03 Thread Skip Montanaro
Changes by Skip Montanaro: Removed file: http://bugs.python.org/file8851/string-split.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list maili

[issue1538] Avoid string copy when split char doesn't match

2007-12-03 Thread Skip Montanaro
Skip Montanaro added the comment: I'm not sure why a string subclass shouldn't work, but I've attached a new version of the patch that calls PyString_CheckExact() to prevent using a string subclass. Added file: http://bugs.python.org/file8864/string-split.patch ___

[issue1538] Avoid string copy when split char doesn't match

2007-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: I think this is not quite right; you shouldn't return self unless it is an exact string instance. If it is a subclass of PyString should make a copy. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]>

[issue1538] Avoid string copy when split char doesn't match

2007-12-01 Thread Skip Montanaro
New submission from Skip Montanaro: The topic of avoiding string copies in certain string methods came up in the ChiPy list: http://mail.python.org/pipermail/chicago/2007-December/002975.html. The attached patch modifies the split and rsplit implementations to avoid making a copy of self wh