The teacher who believes education should be about life, not just about passing exams. His inexperienced colleague, who is driven by a headmaster obsessed with league tables. These could be stereotype characters, but in Alan Bennett’s The History Boys they are much more than that.

“Felicitations to you all,” cries bow-tied Hector as he bounces into the classroom. “Our esteemed headmaster has given these periods the title of ‘general studies’. If, Heaven forefend, I was entrusted with the timetable, I would call them ‘a waste of time’.” Hector proceeds to discuss English poetry, then French brothels: this involves one boy stripping to his Y-fronts, and quite a bit of energetic simulated sex. Inevitably, the headmaster walks in. The speed with which the scene is converted from brothel to military hospital carrying out amputations is one of the plays’s many comic highlights.

“Have you got a nickname yet?” asks to-the-point teacher Mrs Lintott as she greets new and nervous Irwin in the staff room. Even this cheery question makes him jump as if stung by a wasp. As time goes on, it becomes apparent that Irwin has his own secrets to hide, but meanwhile a major scandal sweeps the school. Hector rides home each day on a motorbike, taking a favoured pupil as pillion passenger. But what should Mrs Headmaster see out of her charity shop window one day? “Your hand on a boy’s genitals — at 50mph!” splutters the head as he confronts Hector.

Bennett’s storyline deals not only with sexuality and school politics, but the whole subject of education and the way it can fashion the rest of pupils’ lives. He does this by mixing a wide range of theatrical skillls with consummate dexterity. Not only is there the multi-layered dialogue for which Bennett is famous, there’s also comedy requiring split-second timing. There’s music, too — in this production ranging from the 1980s (in which the play is set) back to Gracie Fields.

This West Yorkshire Playhouse production first toured last year, and in Cheltenham several audience members were paying a return visit — The History Boys certainly repays repeated viewing. Philip Franks presents a totally absorbing, vulnerable beneath the surface, Hector, while Ben Lambert acquits himself well in giving the bottled-up Irwin some character — a difficult job. There are excellent cameos from Thomas Wheatley as the stressed headmaster, and from Penelope Beaumont as Mrs Lintott — her most unfortunate remark: “I’m a safe pair of hands.” The eight boys never put a foot wrong.

Until Saturday. Tickets: www.everymantheatre.org.uk or 01242 572573. The production is at the Wycombe Swan next week 01494 512000 (www.wycombeswan.co.uk).