For some reason, __pyx_n_type and a whole array of other Pyrex-provided variables for type(), len(), the types for tuple and list, AttributeError, etc work fine in _core but not in bodies. I've spent the last 2 hours trying to figure out why without success.
I've seen this sort of bug before but don't know the solution to it. It seems to pop up almost randomly and disappear just as mysteriously when non-related changes to the code are made. Hopefully the Pyrex guys can solve this.
In related news - I'm giving Piet (and prehaps other Pyrex devs) read access to our repository, sending tarballs is taking too long.