Mr. Sanders suggested that it was premature right now to unveil the names of his prospects for the nation’s highest court — “got to kind of win the nomination first,” he said — but he warmed to the idea in an interview with the editorial board of The New York Times.

“It’s not a bad idea,” Mr. Sanders said, noting that his wife, perhaps his most influential adviser, supported it. “It’s a reasonable idea. My wife agrees with you. Yeah. I’ll take that into consideration.”

Mr. Sanders, a progressive Vermont senator who remains a political independent, does not face the sort of ideological suspicion that many on the right harbored toward Mr. Trump when he ran, but he is viewed warily by some Democrats. And with polls in the states that begin the presidential nominating process showing him at or near the top of the field, his willingness to name his potential Supreme Court appointments at a moment the court is sharply divided could offer a measure of comfort to uneasy primary voters.