attractivechaos / plb

Programming language benchmarks
http://attractivechaos.github.com/plb/
272 stars 57 forks source link

Fix for patmch_v1.py for shedskin #6

Closed fahhem closed 13 years ago

fahhem commented 13 years ago

Shedskin's slightly different regex implementation errors out when the r.search() input is an empty string, so this just makes sure such a search never happens.

Also, Shedskin 0.8 doesn't strip the newline off the last sys.argv so it also takes it off if it's still there. It's a one-time cost and will still work when SS is updated to fix it.

fahhem commented 13 years ago

Turns out I was incorrect about the newline bit. The first set of changes (regarding repattern and sys.argv[1]) can be removed.

attractivechaos commented 13 years ago

As I have updated to ShedSkin-0.9 that does not have this problem, I will not pull the request. Thank you.