Re: calling one staticmethod from another

Discussion in 'Python' started by Jean-Michel Pichavant, Oct 30, 2012.

  1. ----- Original Message -----
    [snip]
    > I haven't figured out the justification for staticmethod,


    http://en.wikipedia.org/wiki/Namespace
    +
    "Namespaces are one honking great idea -- let's do more of those!"

    Someone may successfully use only modules as namespaces, but classes can be used as well. It's up to you.

    Cheers,

    JM


    -- IMPORTANT NOTICE:

    The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
     
    Jean-Michel Pichavant, Oct 30, 2012
    #1
    1. Advertising

  2. Am 30.10.2012 18:23, schrieb Jean-Michel Pichavant:
    > ----- Original Message -----
    > [snip]
    >> I haven't figured out the justification for staticmethod,

    >
    > http://en.wikipedia.org/wiki/Namespace
    > +
    > "Namespaces are one honking great idea -- let's do more of those!"
    >
    > Someone may successfully use only modules as namespaces, but classes
    > can be used as well. It's up to you.


    Indeed, see e.g. Steven D'Aprano's approach at formalizing that:

    http://code.activestate.com/recipes/578279/


    Greetings!

    Uli
     
    Ulrich Eckhardt, Oct 31, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loveNUNO
    Replies:
    2
    Views:
    924
    loveNUNO
    Nov 20, 2003
  2. Michal Vitecek
    Replies:
    4
    Views:
    949
    Michael Hudson
    Feb 11, 2004
  3. Andrew Bennetts

    Re: __getitem__ and classmethod/staticmethod

    Andrew Bennetts, Jun 25, 2004, in forum: Python
    Replies:
    0
    Views:
    483
    Andrew Bennetts
    Jun 25, 2004
  4. Robert Cohen
    Replies:
    3
    Views:
    277
    Andrew Durstewitz
    Jul 15, 2003
  5. Ulrich Eckhardt

    calling one staticmethod from another

    Ulrich Eckhardt, Oct 30, 2012, in forum: Python
    Replies:
    5
    Views:
    178
    Mark Lawrence
    Oct 30, 2012
Loading...

Share This Page