Hi Ondrej, > I am trying the new C++ syntax. I got the following error (all files > attached): > > $ cython _hermes_common.pyx > ... > if len(self.attributes) != 0: > TypeError: object of type 'NoneType' has no len() >
Yep, that's a bug. I'm pretty sure you just want to change that line in Cython/Compiler/Nodes.py from "if len(self.attributes) != 0:" to just "if self.attributes:" and you'll be good. Amusingly, I tried to grab the source files you attached and test this -- and hit a different bug (a problem in parsing). I don't know why -- you just posted and confirmed that we're using the same version (before I even asked!). Is there any chance your source files are slightly out of sync with the ones you posted? (Maybe forgot to save changes in your editor before posting?) Has anyone else tried and hit the same bug, or is my setup wonky? In any event, there are definitely some bugs -- I'm currently trying to get type inference and the Sage library to get along, but I'll look at this soon if no one beats me to it. -cc _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
