<br><div><span class="gmail_quote">On 3/22/06, <b class="gmail_sendername">Neal Norwitz</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> 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 3/21/06, Neil Schemenauer <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<br>> On Tue, Mar 21, 2006 at 08:52:34PM -0800, Neal Norwitz wrote:<br>> > I thought about re-organizing all the methods to try to group them
<br>> > a bit better. Then I realized the beneift is likely far too small<br>> > for the larger pain of having to maintain 2 tables of methods (one<br>> > for 2.x one for 3.x).<br>><br>> Maybe C99 designated initializers could solve that problem (assuming
<br>> we are going to require a C99 compiler).<br><br>That (using initializers) would be good for several reasons. We can<br>get rid of the "holes" 0s. We don't need the comments as they would<br>be redudant with the real names.
</blockquote><div><br>For the old and ignorant among us (although I concede I may be the only one) could someone explain 'designated initializers' and how the code would look? As for keeping 3.x and 2.x Type structs similar, we _could_ add a new type struct for
3.0 and transparently support the old type struct (by translating it to a 3.0 one.) The two structs would have to be mirrored for the benefit of the 'old' code (so references to typeobj.tp_free where it was initialized to 0 would still work right) but at least we can have source-level perfection without compromizing source-level backward compatibility.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If we used C99, we could also use // comments and inline declarations,<br>rather than only at the start of a scope. I would like all of these,
<br>though I'm not sure we want to require C99. I updated the PEP with an<br>outstanding issues section and added using C99.</blockquote><div><br>I'm not sure I like those. In fact, I'm pretty sure I don't :) // is all about style; I don't think it has any. Inline declarations is about code readability. Code that spreads out the declarations all over the place just look messy. I'll grant that there are cases where it's more logical to keep a declaration right near its (only) use, but a great many of those cases also introduce a new block. I've worked a bit with (messy) C99 code, and I always got a much clearer picture of what a function tries to do (and how messy it is) when I moved all the declarations to the top of the function/block. Just my two cents; I'll happily follow whatever PEP-3007 says.
<br><br>Speaking of PEP-3007, any ideas on how different from PEP-0007 it'll be? tabs or four-space indents? How rigourously will it be applied? (I honestly don't have any problems with PEP-0007 except for its intermittent application.) Do we get to arbitrarily clean up extensions and the like? :>
<br></div></div><br>-- <br>Thomas Wouters <<a href="mailto:firstname.lastname@example.org">email@example.com</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!