On May 24, 2008, at 11:57 PM, Lisandro Dalcin wrote:

> After eight hours of pain try to make 'classmethod' working in Cython,
> I've found 'extrange' stuff in Python 3.0 sources, specifically at
> 'typeobject.c' . Please, open the file or just hit the following
> direct link:
>
> http://svn.python.org/projects/python/branches/py3k/Objects/ 
> typeobject.c
>
> and look at the macro definition pasted below, it is at the begining
> of the file:
>
> #define MCACHE_CACHEABLE_NAME 
> (name)                                     \
>               PyString_CheckExact(name) &&                            \
>               PyString_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
>
> Does make any sense the PyString_XXXX there??? If this is a nonsense,
> surelly from a bad merge from Py2.6 or cut-and-paste error, then I now
> definitely understand way I was having trouble with the new method
> cache in 2.6 but NOT in 3.0. In 3.0, the method cache is just not
> working because the macro definition is wrong, identifiers are never
> byte strings in Py3.0 !!

I'm not sure what the method cache for 2.6/3.0 is, is there a good  
reference explaining this? It would seem, however, that you have a  
good point.

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

Reply via email to