Code-switching has always been an intriguing phenomenon to sociolinguists. While the general attitude to it seems negative, people seem to code-switch quite frequently. Teachers of English as a foreign language too frequently claim that they do not like to code-switch in the language classroom for various reasons – many are of the opinion that only the target language should be used in the classroom. This study looks at the teachers’ attitudes towards code-switching in teaching English as a foreign language to Malay students at one of the local universities in Malaysia. Data was collected through observations, questionnaires and interviews. Each teacher was observed, their language use were recorded, transcribed and then analyzed using the functions proposed by Gumperz (1982). The results of the study showed that teachers do code-switch in the language classroom, despite their claim that they do not. Analysis of the data showed that, in most cases, code switching by teachers was done to serve pedagogical purposes.