<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I have been reading Luciano Ramalho’s <i class="">Fluent Python, </i>and in the book he says he cannot think of a good use for <font face="Menlo" class="">staticmethod</font>, I have been thinking about that, and so far I have only thought of one good use case: when you have a version of a common function, e.g., <font face="Menlo" class="">sum, </font>and you want to qualify it with a better name but something like <font face="Menlo" class="">sumLineItems </font>would sound wrong (to me at least). Would this be a good choice for something like:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">class LineItem:</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">      </span>. . . . . . . .</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>def __add__(self, other):</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">      </span>### Function body ###</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>. . . . . . . .</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">      </span>@staticmethod</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>def sum(items: Sequence[LineItem]) -> LineItem:</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">     </span>### Add up LineItems ###</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">Does this seem like a reasonable use for <font face="Menlo" class="">staticmethod</font>? I think its a good way to qualify a name in a more concise way.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Ed M.</div><div class=""></div></body></html>