<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 14:10, MRAB <span dir="ltr">&lt;<a href="mailto:python@mrabarnett.plus.com">python@mrabarnett.plus.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi all,<br>
<br>
I&#39;m back on the regex module after doing other things and I&#39;d like your<br>
opinion on a number of matters:<br>
<br>
Firstly, the current re module has a bug whereby it doesn&#39;t split on<br>
zero-width matches. The BDFL has said that this behaviour should be<br>
retained by default in case any existing software depends on it. My<br>
question is: should my regex module still do this for Python 3?<br>
Speaking personally, I&#39;d like it to behave correctly, and Python 3 is<br>
the version where backwards-compatibility is allowed to be broken.<br>
<br></blockquote><div><br></div><div>If it is a separate module under a different name it can do the proper thing. People will just need to be aware of the difference when they import the module.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


Secondly, Python 2 is reaching the end of the line and Python 3 is the<br>
future. Should I still release a version that works with Python 2? I&#39;m<br>
thinking that it could be confusing if new regex module did zero-width<br>
splits correctly in Python 3 but not in Python 2. And also, should I<br>
release it only for Python 3 as a &#39;carrot&#39;?<br>
<br></blockquote><div><br></div><div>That&#39;s totally up to you. There is practically no chance of it getting into the 2.x under the stdlib at this point since 2.7b1 is coming up and this module has not been out in the wild for a year (to my knowledge).  If you want to support 2.x that&#39;s fine and I am sure users would appreciate it, but it isn&#39;t necessary to get into the Python 3 stdlib.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Finally, the module allows some extra backslash escapes, eg \g&lt;name&gt;, in<br>
the pattern. Should it treat ill-formed escapes, eg \g, as it would have<br>
treated them in the re module?<br>
<br></blockquote><div><br></div><div>If you want to minimize the differences then it should probably match. As I said, since it is a different name to import under it can deviate where reasonable, just make sure to clearly document the deviations.</div>

<div><br></div><div>-Brett</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/brett%40python.org" target="_blank">http://mail.python.org/mailman/options/python-dev/brett%40python.org</a><br>
</blockquote></div><br>