Dan Klein says you shouldn't do what most of us try to do when we enter the classroom -- leave politics and ideology behind -- instead, ideological openness should be embraced:
In Praise of Ideological Openness, by Daniel B. Klein: Many people, some conservatives included, say we need to get ideology out of the college classroom. Some professors say proudly, “my students never come to know where I stand.”
I practice an opposite approach. I tell students that I am a free-market economist, a classical liberal or libertarian. And I am not suggesting that it is wrong to be ideologically reserved. Different styles suit different professors.
And of course some professors go much too far in pressing their ideological judgments and requiring conformity, even forms of activism. But we should not fall into simplistic ideals of neutrality and objectivity. ... One can open up about ideology without falling into intemperance. Here I meditate on some merits of being open about your own ideology, even somewhat outspoken, when teaching a college course. ...