President Barack Obama waves from Air Force One as he arrives at Worcester Regional Airport, Wednesday, June 11, 2014, in Worcester, Mass. Obama is traveling to Worcester to deliver the commencement address at Worcester Technical High School. (AP Photo/Steven Senne)

President Obama on Wednesday dismissed the argument that House Majority Leader Eric Cantor's primary loss shredded any hope for passing immigration reform and called on House Speaker John A. Boehner (R-Ohio) to do the same.

"It is interesting to listen to the pundits and the analysts and some of the conventional wisdom talks about how the politics of immigration reform seem impossible now," Obama said. "I fundamentally reject that. I will tell the speaker of the House that he needs to reject that. Because if you met those kids today, you would know that politics can't play a part in it.

Obama made his remarks at a Democratic Senatorial Campaign Committee fundraiser in Massachusetts, according to a pool report. He met the kids he mentioned, some of whom are so-called Dreamers, at at a commencement ceremony at Worcester.

Cantor's stunning loss Tuesday to tea party economist David Brat dampened the hopes for passing immigration reform in the minds of many. Cantor's posture on immigration came under attack from the political right in the campaign, serving as a warning to other Republicans.

Obama added, "At a certain point issues are important enough to fight for. My argument about yesterday's election is not that there was too little politics -- there was too little conviction about what was right."