<div dir="ltr">Hi Glyph,<br><br>Thanks for your response!<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 30, 2013 at 8:41 PM, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><div><div>On Sep 30, 2013, at 2:45 AM, Laurens Van Houtven <_@<a href="http://lvh.io" target="_blank">lvh.io</a>> wrote:</div>

<br><blockquote type="cite"><span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">What am I doing wrong? Is this a bug?</span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

</blockquote></div><br></div><div>I think it's pretty clearly a bug.  Calling the argument "proto" in the first place indicates the nature of the confusion.</div><div><br></div><div>There are parts of the flow here from bytes to method execution and back (like _wrapWithSerialization) which are nice for composition, but the fact that they're private sort of ruins their utility for extensibility.</div>

<div><br></div><div>Looking at the code you're trying to write in txampext though, the problem appears to be simply that you're writing functionality close enough to AMP's core that you should be making the changes to AMP directly, and fixing the issue by making changes to AMP itself rather than trying to work around it externally.  The way I was going to recommend fixing it before I clicked on your link was by writing something like ExposingArgument and accessing the locator/receiver/sender via that new API rather than via the 'proto' argument at all :)</div>

</div></blockquote><div><br></div><div>I'm a little confused why that would help; you're saying there should be a new API that gives arguments access to the locator, receiver, sender? What would that look like? Something along the lines of fromBox/toBox, or are you thinking of a more direct approach where the locator has a reference to the other components? (Given your suggestion of not going through the proto argument, I imagine something closer to the latter.)<br>

<br></div><div>My contributions to AMP have been more of the defect-findy kind, but I could certainly turn them more into the code-contributy kind. I imagine I'm not the first person to want tests for command classes (<a href="https://github.com/lvh/txampext/blob/master/txampext/commandtests.py">https://github.com/lvh/txampext/blob/master/txampext/commandtests.py</a>) or a nested AMP box (<a href="https://github.com/lvh/txampext/blob/master/txampext/nested.py">https://github.com/lvh/txampext/blob/master/txampext/nested.py</a>).<br>

</div><div> <br></div><div>I look forward to being in the same locality as you, I presume it will make me more productive ;)<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div style="word-wrap:break-word"><span class=""><font color="#888888"><div>-glyph</div></font></span></div></blockquote><div><br></div><div>cheers<br>lvh <br></div></div></div></div></div>