Skip to main content
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

##Intrusive Code:

When including code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for \$n\$ seconds, when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that, I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread; not possible! You instantly join to the pool after starting to scrape the results.

Instead of that, I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that, janos makes awesome pointsawesome points, I'd just want to see a little documentation on what scrape_results_page does.

##Intrusive Code:

When including code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for \$n\$ seconds, when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that, I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread; not possible! You instantly join to the pool after starting to scrape the results.

Instead of that, I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that, janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.

##Intrusive Code:

When including code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for \$n\$ seconds, when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that, I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread; not possible! You instantly join to the pool after starting to scrape the results.

Instead of that, I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that, janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.

deleted 12 characters in body
Source Link
Quill
  • 11.9k
  • 5
  • 40
  • 93

##Intrusive Code:

When including that code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for n\$n\$ seconds, when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that, I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread? There we go,thread; not possible.! You instantly join to the pool after starting to scrape the results.

Instead of that, I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that, janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.

##Intrusive Code:

When including that code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for n seconds when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread? There we go, not possible. You instantly join to the pool after starting to scrape the results.

Instead of that I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.

##Intrusive Code:

When including code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for \$n\$ seconds, when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that, I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread; not possible! You instantly join to the pool after starting to scrape the results.

Instead of that, I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that, janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.

Source Link
Vogel612
  • 25.3k
  • 7
  • 58
  • 141

##Intrusive Code:

When including that code from somewhere else, the script parser will automatically execute it. I really don't want multithreaded code to run for n seconds when I import something.

You should include a if __name__ == '__main__'-block to fix that behaviour. In addition to that I'd personally extract the last four lines into a separate method.

##Impossible Async:

Let's say I want to run this, and do something else on the main-thread? There we go, not possible. You instantly join to the pool after starting to scrape the results.

Instead of that I'd personally keep the pool open and async, unless explicitly calling a .join method:

def join():
    pool.join()

Aside from that janos makes awesome points, I'd just want to see a little documentation on what scrape_results_page does.