Tom Swifty

A Tom Swifty (or Tom Swiftie) is a phrase in which a quoted sentence is linked by a pun to the manner in which it is attributed. Tom Swifties may be considered a type of wellerism. The standard syntax is for the quoted sentence to be first, followed by the description of the act of speaking. The hypothetical speaker is usually, by convention, called "Tom" (or "he" or "she").
Origins.
The name comes from the Tom Swift series of books (1910–present), similar in many ways to the better-known Hardy Boys and Nancy Drew series, and, like them, produced by the Stratemeyer Syndicate. In this series, the young scientist hero underwent adventures involving rocket ships, ray-guns and other things he had invented.
A stylistic idiosyncrasy of at least some books in this series was that the author, "Victor Appleton," went to great trouble to avoid repetition of the unadorned word "said", using a different quotative verb, or modifying adverbial words or phrases in a kind of elegant variation. Since many adverbs end in "ly" this kind of pun was originally called a Tom Swiftly, the archetypal example being "'We must hurry,' said Tom Swiftly." At some point, this kind of humor was called a Tom Swifty, and that name is now more prevalent.
This excerpt (with emphasis added) from the 1910 novel "Tom Swift and His Airship" illustrates the style:
"Oh, I'm not a professor," he said quickly. "I'm a professional balloonist, parachute jumper. Give exhibitions at county fairs. Leap for life, and all that sort of thing. I guess you mean my friend. He's smart enough for a professor. Invented a lot of things. How much is the damage?"
"No professor?" cried Miss Perkman indignantly. "Why I understood from Miss Nestor that she called some one professor."
"I was referring to my friend, Mr. Swift," said Mary. "His father's a professor, anyhow, isn't he, Tom? I mean Mr. Swift!"
"I believe he has a degree, but he never uses it," was the lad's answer.
"Ha! Then I have been deceived! There is no professor present!" and the old maid drew herself up as though desirous of punishing some one. "Young ladies, for the last time, I order you to your rooms," and, with a dramatic gesture she pointed to the scuttle through which the procession had come.
"Say something, Tom — I mean Mr. Swift," appealed Mary Nestor, in a whisper, to our hero. "Can't you give some sort of a lecture? The girls are just crazy to hear about the airship, and this ogress won't let us. Say something!"
"I — I don't know what to say," stammered Tom.
The Tom Swifty, then, is a parody of this style with the incorporation of a pun.
A much earlier example may be found, for example, in Dickens' "Our Mutual Friend":
"How Do You Like London?" Mr Podsnap now inquired from his station of host, as if he were administering something in the nature of a powder or potion to the deaf child; "London, Londres, London?"
The foreign gentleman admired it.
"You find it Very Large?" said Mr. Podsnap, spaciously.
History.
Tom Swifties first came to prominence in the United States with the 1963 publication of the book "Tom Swifties" by Paul Pease and Bill McDonough. The spread of Tom Swifties was abetted by an article in the May 31, 1963 edition of "Time" magazine, which also announced a contest for its readers to submit their own Tom Swifties. Included was a special category, "Time Swifties," which were to contain a reference to "Time" magazine; however, only a few submissions were made of this nature. Among the submissions that were subsequently printed was "Someone has stolen my movie camera!" Tom bellowed and howled.
The "Time" contest caused the popularity of Tom Swifties to grow, for a period of some years. Tom Swifties found a large teenage audience on the joke column on the last page of each month's issue of "Boys' Life", the magazine for Boy Scouts.
In January 2017 Jack Waley-Cohen appeared on the British BBC Radio 4 programme "The Museum of Curiosity"; his hypothetical donation to this imaginary museum was "A Book of Tom Swifties".