ipython/ipython — pull request #4237 by takluyver (2013-09-20 02:30:06+00:00)
Title: Keywords should shadow magic functions

This is a problem I discovered while working on #4151 with @fperez.

Before:

```
In [1]: def myif(line):
...: print 'boo'
...:

In [2]: ip = get_ipython()

In [3]: ip.register_magic_function(myif, magic_name='if')

In [4]: if foo
boo
```

After:

```
In [1]: def myif(line):
print 'boo'
...:

In [2]: ip = get_ipython()

In [3]: ip.register_magic_function(myif, magic_name='if')

In [4]: if foo
File "", line 1
if foo
^
SyntaxError: invalid syntax
```