[issue18781] re.escape escapes underscore (Python 2.7)

2013-08-19 Thread Ezio Melotti
Ezio Melotti added the comment: This was considered a new feature when it was added in 3.2 (see #2650), so it was not backported to 2.7 because -- even if it was a minor change -- it was not 100% backward compatible. -- assignee: -> ezio.melotti resolution: -> rejected stage: -> com

[issue18781] re.escape escapes underscore (Python 2.7)

2013-08-19 Thread Vajrasky Kok
New submission from Vajrasky Kok: $ ./python --version Python 2.7.5+ $ ./python Python 2.7.5+ (2.7:062533327ad2, Aug 19 2013, 22:44:52) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> re.escape('_') '\\_'