<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>While going through merge proposal, I ran across this one from Mark Washenberger about limiting the number of decorators to 2 in nova code: <<a href="https://review.openstack.org/2966">https://review.openstack.org/2966</a>></div><div><br></div><div>There's some good discussion on this in the proposal comments, but I thought it should hit the mailing list as well, in case folks wanted to weigh in but hadn't seen the proposal (I don't have a strong opinion pro or con here).</div><div><br></div><div>Here's the proposed addition for HACKING:</div><div><br></div><div><div>Decorators</div><div>----------</div><div>A function or method should not have more than two decorators applied to it</div><div>where it is defined.</div><div><br></div><div>Decorators are a powerful feature of Python that can eliminate some repetitive</div><div>code. However, decorator usage can be more difficult to debug or maintain than</div><div>alternative approaches to reduce repetition. These difficulties multiply when</div><div>decorators are stacked on top of each other. To ensure judicious use, we</div><div>therefore limit decorator depth to no more than two.</div></div><div><br></div><div><br></div><br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Take care,</div><div><br></div><div>Lorin</div><div>--</div><div>Lorin Hochstein</div><div>Lead Architect - Cloud Services</div><div>Nimbis Services, Inc.</div><div><a href="https://www.nimbisservices.com/">www.nimbisservices.com</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></body></html>