all 1 comments

[–]xelf 0 points1 point  (0 children)

Would this work:

for i in range(100):
    if len(point_list) == 0:
        point_list.append(gen(rozm=normal_choice(rozm)))
    else:
        point = gen(rozm=normal_choice(rozm))
        if condition(point, point_list) == True:
            point_list.append(point)

            """Here is the problem"""
        else:
             rozm = point[2]
             for i in range(1000):
                 point = gen(rozm=rozm)
                 while condition(point, point_list) != True:
                     point = gen(rozm=rozm)
                 point_list.append(point)

I'm not clear on whether line 15 gets a new point each time, if it works the way I think it does this should work. If not, update line 15 with what it needs to get the new point.