The disciples of Tsze-hsia asked Tsze-chang about the principles that should characterize mutual intercourse. Tsze-chang asked, "What does Tsze-hsia say on the subject?" They replied, "Tsze-hsia says: 'Associate with those who can advantage you. Put away from you those who cannot do so.'"Go here to read the introductory post to this serialized version of the Analects of Confucius.
Tsze-chang observed, "This is different from what I have learned. The superior man honors the talented and virtuous, and bears with all. He praises the good, and pities the incompetent. Am I possessed of great talents and virtue? Who is there among men whom I will not bear with? Am I devoid of talents and virtue? Men will put me away from them. What have we to do with the putting away of others?"
~ James Legge translation via The Internet Classics Archive ~