No it's not a local variable of function index, rather it's a attribute of that function . And yes you can modify it outside the function too.
Read the PEP 232 on function attributes.
example:
In [2]: def foo():pass
...:
In [3]: foo.bar="text"
In [4]: foo.bar
Out[4]: 'text'