Computer Science Canada [Python-tut] Iterating Over any Object |
Author: | wtd [ Thu Jul 14, 2005 4:39 am ] | ||||||||
Post subject: | [Python-tut] Iterating Over any Object | ||||||||
So we've seen how we can do this in Ruby. It's pretty darn simple.
Well, as it turns out, it's pretty easy in Python too.
We can now create a new Name object.
And iterate over its component names.
|
Author: | MysticVegeta [ Fri Jul 29, 2005 7:44 am ] | ||
Post subject: | |||
Isnt iteration calling of a same procedure inside that procedure in turing?
Is that what you are talking about? |
Author: | Mazer [ Fri Jul 29, 2005 8:47 am ] |
Post subject: | |
That's recrusion, MysticVegeta. |
Author: | MysticVegeta [ Fri Jul 29, 2005 9:10 pm ] |
Post subject: | |
But the turing book says calling a procedure in that procedure is called iteration and calling a function inside the same function is called recursion... |
Author: | 1of42 [ Fri Jul 29, 2005 9:36 pm ] |
Post subject: | |
If it says that, it's wrong. |
Author: | Hikaru79 [ Fri Jul 29, 2005 9:48 pm ] |
Post subject: | |
MysticVegeta wrote: But the turing book says calling a procedure in that procedure is called iteration and calling a function inside the same function is called recursion...
Iteration is going through a set or list or array, etc, or objects/values/etc, in a sequential manner. Now, what the book might have given is a recursive example of iteration, which is entirely possible. However, there is a distinction between the two. |