Update compiler.py

Moved initialization into else block