On Wed, Apr 7, 2010 at 1:19 AM, Jean-Michel Pichavant <span dir="ltr"><<a href="mailto:jeanmichel@sequans.com">jeanmichel@sequans.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


Usually, when using classes as namespace, functions are declared as static (or as classmethod if required).<br>
e.g.<br>
<br>
<br>
class Foo:<br>
   @classmethod<br>
   def process(cls, document):<br>
       print 'process of'<br>
       cls.foo(document)<br>
<br>
   @staticmethod<br>
   def foo(document):<br>
       print document<br>
<br>
In [5]: Foo.process('my document')<br>
process of<br>
my document<br>
<br>
<br>
There is no more question about self, 'cause there is no more self. You don't need to create any instance of Foo neither.<font color="#888888"></font></blockquote><div><br><br>JM, I beg to differ. If many functions are static inside a class, I would simply put those methods right under a module instead.<br>

<br>My 2c,<br>Xav<br></div></div>