Discussion

Ask HN: Is this a Python bug?

The run method below never executes in Python 3.5:

from threading import Thread

import time

class MyThread(Thread):

    def __init__(self):

        Thread.__init__(self)

    def run(self):
        while True:
            print("Forever")
            time.sleep(10)

        return

        yield from None
if __name__ == '__main__':

    mt = MyThread()

    mt.start()

    mt.join()
3 points wslh 10 years ago 4 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton