Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23247

while true means loop forever but here is a obviously empty list(terminal_values_stack) ,why use while true here?This is the gplearn code [closed]

$
0
0

terminal_value_stack = []# We need a terminal, add a variable or constant

            if self.const_range is not None:                terminal = random_state.randint(self.n_features + 1)

#why while true here? it seems make no differences.terminal_value_stack is an empty listwhile True:

                    if (terminal in terminal_value_stack and terminal != self.n_features):                        terminal = random_state.randint(self.n_features + 1)                    else:                        break            else:                terminal = random_state.randint(self.n_features)

i want to ask why here use while TRUEi am a new learner and i can't get the meaning here.Thank you for answering my question


Viewing all articles
Browse latest Browse all 23247

Trending Articles