Re: functors

Discussion in 'Python' started by Erik Max Francis, Jul 2, 2003.

  1. Tom Plunket wrote:

    > I wouldn't mind creating a new class to wrap this up (that's what
    > I'd do in C++, and that class would have an operator() defined),
    > but I can't seem to discover how to make callable objects in
    > Python.


    The __call__ method is the equivalent of C++'s operator ().

    --
    Erik Max Francis && && http://www.alcyone.com/max/
    __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
    / \ Sometimes there's no point in giving up.
    \__/ Louis Wu
    Erik Max Francis, Jul 2, 2003
    #1
    1. Advertising

  2. Erik Max Francis

    Tom Plunket Guest

    Erik Max Francis wrote:

    > The __call__ method is the equivalent of C++'s operator ().


    Thanks guys.

    -tom!
    Tom Plunket, Jul 3, 2003
    #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. Paul MG
    Replies:
    2
    Views:
    391
    Dhruv
    Jul 3, 2003
  2. Rob Williscroft

    Re: Need help with generic functors....

    Rob Williscroft, Aug 17, 2003, in forum: C++
    Replies:
    3
    Views:
    345
    Gordon Scott
    Aug 18, 2003
  3. red floyd
    Replies:
    0
    Views:
    317
    red floyd
    Nov 13, 2003
  4. nsgi_2004

    functors

    nsgi_2004, Aug 12, 2004, in forum: C++
    Replies:
    2
    Views:
    463
    Karl Heinz Buchegger
    Aug 12, 2004
  5. Satish
    Replies:
    1
    Views:
    784
    David Hilsee
    Sep 10, 2004
Loading...

Share This Page