<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    On 2017-02-10 05:44, Markus Meskanen wrote:<br>
    <blockquote
cite="mid:CAJAvhDZnATOGM4hgimBv1vmPBzNG3ftgOG=Pz9uKtxO_z-YF_g@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Fri, Feb 10, 2017 at 12:29 PM,
            Stephan Houben <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:stephanh42@gmail.com" target="_blank">stephanh42@gmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div>What about using a simple decorator instead?</div>
                <div><br>
                </div>
                <div>def monkey_patch(cls):</div>
                <div>    return lambda func: setattr(cls, func.__name__,
                  func)</div>
                <div><br>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <p>I suggest naming the decorator with something less generic than
      "monkey_patch", like "extension_method".</p>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>