<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 7, 2014 at 6:24 PM, Larry Hastings <span dir="ltr"><<a href="mailto:larry@hastings.org" target="_blank">larry@hastings.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<div>On 01/07/2014 12:46 PM, Mark Lawrence
wrote:<br>
</div>
<blockquote type="cite"><br>
Maybe overkill but why not follow 3 with 2 at the end of the file,
the marker to be a very clear /* Generated by Argument Clinic - DO
NOT EDIT BELOW THIS LINE */ or whatever wording is appropriate in
this case.
<br>
<br>
</blockquote>
<br></div>
For what it's worth, if we use the "accumulator" approach I propose
that the generated code doesn't go at the very end of the file.
Instead, I suggest they should go *near* the end, below the
implementations of the module / class methods, but above the
methoddef/type structures and the module init function.<br></div></blockquote><div><br></div><div>If it is accumulated in a single location should it just be a single block for everything towards the end? Then forward declarations would go away (you could still have it as a comment to copy-and-paste where you define the implementation) and you can have a single macro for the PyMethodDef values, each class, etc. If you accumulated the PyMethodDef values into a single macro it would help make up for the convenience lost of converting a function by just cutting the old call signature up to the new *_impl() function.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
My reasoning: when I navigate CPython C files implementing a module
or a type, when I know what entry point I want I just search for its
name. When I don't know what I want, I jump to the end, then scroll
up until I find the name in the init function or the structures. So
I wouldn't want the code at the very end; that would screw up that
navigation mode.<br></div></blockquote><div><br></div><div>That's how I navigate as well.</div></div></div></div>