Doherty, who has written so eloquently about the Code in his books Pre-Code Hollywood and Hollywood's Censor (and who will introduce the June 4 screening of The Maltese Falcon), is on the money when he suggests that noir was the inherent enemy of the wholesome values the Code sought to protect. James M. Cain, who wrote the novel on which Double Indemnity was based, was considered unadaptable throughout the '30s; the fact that Breen's office allowed Wilder to film the corrosive screenplay he and Raymond Chandler came up with indicates how much times had changed (and the war had changed them). Cain's sordid narrative is a fable in which lust and greed not only corrupt the protagonists — moist-lipped blonde seductress Phyllis Dietrichson (Barbara Stanwyck) and insurance salesman Walter Neff (Fred MacMurray), who falls in love with her and kills her husband in a plot to snag his accident-insurance money — but eventually turns them against each other. In the words of Neff's hero, the claims investigator Barton Keyes (Edward G. Robinson), it's a trolley they can't get off until it reaches its destination — the cemetery. But the way in which the movie punishes these murderous adulterers doesn't mitigate the vicarious pleasure we take in their behavior, anymore than the fated fall of the cocksure hoods did in pre-Code gangster dramas like The Public Enemy and Scarface.
The world of the noirs, where the characters act on their darkest and most irrational impulses, exiling themselves from the moral comforts of community, is depicted most potently in Double Indemnity and The Maltese Falcon. Humphrey Bogart's San Francisco shamus Sam Spade isn't a dupe like Walter Neff; in the conventional private-eye noirs, which look to Dashiell Hammett and Chandler rather than to Cain for their inspiration, the hero may fall for the femme fatale, but she doesn't destroy him. Spade holds onto his principles: he turns Brigid Shaughnessy (Mary Astor) over to the cops for murder because her victim was his partner, Miles Archer, and though he didn't even like Archer very much, when your partner is killed, you're supposed to do something about it. So the Hays Office gets its moral happy ending, and no one benefits from the much-sought-after solid-gold falcon, any more than the characters benefit from the gold dust that liberates the monster in Bogart's Fred C. Dobbs in a later Huston masterpiece, The Treasure of the Sierra Madre.
Not that Spade is a moral exemplar. He was sleeping with Archer's wife, and he has a sadistic side that emerges whenever he comes in contact with gay men. The Production Code didn't permit any official portrayal of homosexuals, so one wonders how Breen's office could have missed the trio in league with Brigid: Peter Lorre's Joel Cairo, Sydney Greenstreet's Casper Gutman, and Gutman's lover, the "gunsel" Wilmer (Elisha Cook Jr.), who is Spade's special target.