Hi Neil,<br><br>I've been fairly quiet on the Python-dev front for a while -- mainly because I use Python every day and it almost always works.&nbsp; However, as someone who regularly writes small C extension modules and types, I would certainly add a vote for sacrificing any vestiges of backward compatibility in order to rationalize the PyObject structure.&nbsp; The relative short-term pain of forward porting my code base is far offset by the long-term gains of having a legacy-free and streamlined structure.&nbsp; Put another way, forward porting code is less work than continuing to write code long-term against the current model.
<br><br>Two important disclaimers: 1) For my purposes, I don't need code that runs on both Python pre-3k and post-3k without change.&nbsp; 2) I have the ability and means to forward port my code and the necessary third-party extensions that I'll need.&nbsp; Many other developers and users will not have this luxury.
<br><br>-Kevin<br><br><br><div><span class="gmail_quote">On 3/21/06, <b class="gmail_sendername">Neil Schemenauer</b> &lt;<a href="mailto:nas@arctrix.com">nas@arctrix.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tue, Mar 21, 2006 at 05:01:31PM +0100, Thomas Wouters wrote:<br>&gt; I would like Pythonic code to be usable in both 2.x (where x is,<br>&gt; say, 6 or higher) and 3.0, but 3.0 shouldn't need to worry too<br>&gt; much about it.
<br><br>The other question I haven't seen much discussion about is C API<br>changes.&nbsp;&nbsp;Are we hoping that people can port extension modules with<br>little effort or are we going to be doing lots of cleanup?<br><br>Some possible areas of cleanup:
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Use unions for PyObject structure (allowing strict aliasing<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by the compiler).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Move GC attributes into the PyObject structure (e.g. similar<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to how ob_size works).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Rethink weakref implementation (not sure about details but
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maybe we can do better).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Rationalize method structures (e.g. sq_concat and sq_repeat<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;could go away since we can use nb_add and nb_multiply).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Rationalize finalizer behavior (e.g
. get rid of __del__<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;methods in favor of guardians?).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Make it easier to write simple extension types.&nbsp;&nbsp;For example,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;there could be standard tp_clear and tp_traverse methods that<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;could work if the object is simply an array of PyObject pointers.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Do we still need tp_print and tp_repr?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;* Register instead of stack based VM?<br><br><br>One part of me hopes that we could do a lot of cleanup in these<br>areas.&nbsp;&nbsp;Another part is concerned about badly breaking the huge
<br>number of extensions out there (a major reason for Python's success,<br>IMO).&nbsp;&nbsp;In any case, I hope an important objective of P3K will be to<br>make writing extensions even easier.<br><br>&nbsp;&nbsp;Neil<br>_______________________________________________
<br>Python-3000 mailing list<br><a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/python-3000">http://mail.python.org/mailman/listinfo/python-3000</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-3000/jacobs%40bioinformed.com">http://mail.python.org/mailman/options/python-3000/jacobs%40bioinformed.com</a><br></blockquote></div><br>