<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 25, 2013, at 6:51 PM, Matt Haggard <<a href="mailto:haggardii@gmail.com">haggardii@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I have a few thoughts:</p><p dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">First, how does this hypothetical system for specifying return types solve the original problem (that user-written methods on TestCase pass unexpectedly when a non-Deferred is returned)?  If I'm the one writing test_whatever, with the proposed doc string method for specifying return type, then wouldn't I need to write a docstring that specifies the return type as Deferred?</p></blockquote>All of this follows quite obviously if you just consider that a functional specification document (in other words, the generalization of the docstring) is simply a partial bijective homomorphism over the orbifold of possible runtime states (into the Hilbert space with a boundary defined by the NxM coordinate matrix of all possible intersections of sets of bugs and non-bugs of course).</div><div><blockquote type="cite" dir="auto"><p dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Second, I don't love the idea of the docstring changing how a function behaves... I like that it's a free form blob of text.  I think I'd rather see decorators used for this purpose.</p></blockquote>It's not so much changing how the function <i>behaves</i> but rather what its <i>behavior is</i>.</div><div><br></div><div>In any case, there's a great paper which offers an excellent theoretical background that should explain what I mean by that distinction, and should really elucidate some of the other threads in this conversation as well: <<a href="http://isotropic.org/papers/chicken.pdf">http://isotropic.org/papers/chicken.pdf</a>><br></div><div><br></div><div>Hope that clears things up,</div><div><br></div><div>-glyph</div><div><br></div><br></body></html>