Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
recusive generator
#1
i have an algorithm i want to implement. it produces a sequence of number pairs in some order, hence a generator seems to be the way to go. a variant of the algorithm produces the number pairs in a special order i want. this variant is also recursive. how would you do recursion as a generator?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
What are these pairs of numbers, the algorithm and the special order that you want? We may be able to help if we have sufficient information.
Reply
#3
this is some computer art. the number sequences draw the art. tweaking the algorithm changes the art. my focus is getting the code organized as a generator.

can a class method be a generator?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020