The best comedy in British TV history couldn’t have finished with anything but a happy ending