<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Am 02.04.2013 um 16:32 schrieb Glyph &lt;<a href="mailto:glyph@twistedmatrix.com">glyph@twistedmatrix.com</a>&gt;:</div><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><div style="letter-spacing: 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;">My question can be simplified to: Closures yes or no?</div></blockquote><div>"As appropriate".</div></div></div></blockquote><div><br></div><div>I had that coming. :)</div><div><br></div><div>[…]</div><div><br></div><div>Thanks for your verbose explanations!</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><div style="letter-spacing: 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;">If “yes, closures”: Still using cb/eb prefixes? I don’t see them very often in recent examples. What about addBoth handlers?</div></blockquote><div>If you're using a closure, use a descriptive name. &nbsp;The 'cb/eb' prefix notation is not particularly illustrative; I often use an english word like 'when'. &nbsp;whenDisconnected, whenResponseReceived, etc.</div></div></div></blockquote><br></div><div>So you’re cool with calling callbacks after the event that triggered? That would’ve been my second question but I didn’t want it to divert the discussion. I kind of like `onData` et al too but the Twisted examples rather shun it.</div><div><br></div><div>Thanks,</div><div>Hynek</div><br></body></html>