Matthew Barnett <[EMAIL PROTECTED]> added the comment: Comparing item 2 and item 3, I think that item 3 is the Pythonic choice and item 2 is a bad idea.
Item 4: back-references in the pattern are like \1 and (?P=name), not \g<1> or \g<name>, and in the replacement string are like \g<1> and \g<name>, not \1 (or (?P=name)). I'd like to suggest that back-references in the pattern also include \g<1> and \g<name> and \g<-1> for relative back-references. Interestingly, Perl names groups with (?<name>...) whereas Python uses (?P<name>...). A permissible alternative? ---------- nosy: +mrabarnett _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2636> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com