I am trying a simple means of sourcing a file based on the filetype of the new opened file. For example, I want to source python.vimrc when a new file is \*.py. This code (in .vimrc)

```
function LoadFileTypeDefaults()
  let vimrcfile = &filetype . '.vimrc' 
  if filereadable(vimrcfile)
    echo vimrcfile
    source vimrcfile
  endif
endfunction

```

gives the following error when I do `vi new.py`

> 
> python.vimrc
> 
> 
> Error detected while processing function LoadFileTypeDefault:
> 
> 
> line 4:
> 
> 
> E484: Can't open file vimrcfile
> 
> 
> 

My python.vimrc is in my runpath. Moreover, if I replace

```
source vimrcfile

```

with

```
source python.vimrc 

```

everything works as required.

What am I missing?