It is usually used in a mocking or derogative way. "He says that Steve, of all people, is a complete idiot." "Well it takes one to know one."
: : Here is another phrase: "He says that Steve, of all people, is a complete idiot." "Well, that's the pot calling the kettle black."
: Two more equivalent phrases:
: "Look who's talking."
: "YOU should talk!" IT TAKES ONE TO KNOW ONE - "Only a person with identical character traits would be able to recognize those traits in someone else. Often used as a curt rejoinder to deflect an accusation; you're only saying that about me because it's true of you. Originated in the late nineteenth or early twentieth century." From "Random House Dictionary of Popular Proverbs and Sayings" by Gregory Y. Titelman (Random House, New York, 1996).