According to the buffer PEP, __getbuffer__ should raise a BufferError 
under certain circumstances. This is not present in older versions of 
Python. Backport/emulate or not? Any good ideas for how it should 
happen? (I'm blank when it comes to both builtins and creating exception 
types.) One option could be to simply make BufferError be a ValueError 
in Python 2.5-; still, the main question I guess is whether we import 
BufferError into the Cython builtin scope.

Slightly related, look at this code in Symtab.py:
def declare_builtin(self, name, pos):
    if not hasattr(__builtin__, name):

If I'm not entirely wrong, this means that BufferError (and other new 
builtin symbols) will be available only if you run Cython under Python 
2.6+. I find the fact that results of a compilation depends on the 
Python version used for running Cython somewhat disturbing. Should 
perhaps a literal list of accepted Cython builtins be present in 
Symtab.py instead? (Or couple it to Builtins.py somehow?)

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to