Daniel Norberg, 06.01.2011 12:20: > I'm getting a curious error in Cython 0.14 when trying to compile this: > > def bar(foo): > qux = foo > quux = foo[qux.baz] > > The error message: > > $ cython bar.py > > Error compiling Cython file: > ------------------------------------------------------------ > ... > def bar(foo): > qux = foo > quux = foo[qux.baz] > ^ > ------------------------------------------------------------ > > /Users/daniel/Desktop/cython-test/bar.py:3:15: Object of type > '<unspecified>' has no attribute 'baz' > > Cython 0.13 compiles this just fine. I also tried the latest revision of > cython-devel (b816b03ff502) and it fails.
I can reproduce this. From a quick test, it seems like the type inference machinery processes 'quux' and 'qux' in the wrong order, i.e. 'quux' before 'qux'. Anyone interested in taking a closer look? Stefan _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev