Re: How is Python designed?

Discussion in 'Python' started by Limin Fu, Dec 8, 2004.

  1. Limin Fu

    Limin Fu Guest

    It seems that we focused on different things. I was
    talking about the example I have given for arithmetic
    evaluation. And you focused the AST-based evaluation,
    which, I belive, is different from my example. I also
    agree that they called the functions for the same
    number of times, the difference is how they are
    called.

    Resursive function is a function called itself. Am I
    wrong?

    I'm sure the code in my example is recursive. As I
    have said, you may show those codes I gave as example
    to somebody know C++ well to check if it is recursive.

    Best regards,

    Limin



    __________________________________
    Do you Yahoo!?
    Read only the mail you want - Yahoo! Mail SpamGuard.
    http://promotions.yahoo.com/new_mail
     
    Limin Fu, Dec 8, 2004
    #1
    1. Advertising

  2. > I'm sure the code in my example is recursive. As I
    > have said, you may show those codes I gave as example
    > to somebody know C++ well to check if it is recursive.


    I just had second thoughts about tree-traversal beeing recursive - and I
    have to admit that I'm not entirely sure if I can hold up the statement
    that it's not recursive. It might be counted as that, as the strategy of
    traversing a tree certainly is of a recursive nature, as its styled
    somewhat like this:

    def treewalk(node):
    for child in node.childs:
    treewalk(child)
    node.do_something()

    So maybe you're right in claiming it beeing recursive. But then,
    depth-traversal is recursive, too.

    Now apart from that, I still fail to see where your method of evaluation has
    any speed gains.

    --
    Regards,

    Diez B. Roggisch
     
    Diez B. Roggisch, Dec 8, 2004
    #2
    1. Advertising

  3. > agree that they called the functions for the same
    > number of times, the difference is how they are
    > called.


    What do you mean by difference in calling - a call is a call, no?
    --
    Regards,

    Diez B. Roggisch
     
    Diez B. Roggisch, Dec 8, 2004
    #3
    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. Limin Fu

    How is Python designed?

    Limin Fu, Dec 2, 2004, in forum: Python
    Replies:
    2
    Views:
    312
    Terry Reedy
    Dec 3, 2004
  2. Limin Fu

    Re: How is Python designed?

    Limin Fu, Dec 3, 2004, in forum: Python
    Replies:
    2
    Views:
    319
    Arthur Rambo
    Dec 3, 2004
  3. Limin Fu

    Re: How is Python designed?

    Limin Fu, Dec 4, 2004, in forum: Python
    Replies:
    2
    Views:
    297
    Robert
    Dec 5, 2004
  4. Limin Fu

    Re: How is Python designed?

    Limin Fu, Dec 6, 2004, in forum: Python
    Replies:
    2
    Views:
    347
    LutherRevisited
    Dec 8, 2004
  5. Chris Angelico
    Replies:
    109
    Views:
    767
    Mark Lawrence
    Oct 26, 2013
Loading...

Share This Page