toki doki, 02.07.2010 17:57: >>> While " *iter=5 " and " vect.at(0)=5 " ares valid C++ code. >> >> ... bug not valid Cython code.
This was supposed to spell "but not valid Python code". >> If this is to be supported at all, it needs >> at least a different spelling. >> > I see what you mean. Although "valid cython code" should be a moving > target. Sort of, but rather towards less special syntax and more Python syntax. "vect.at(0)=5" doesn't fit anything in Python and someone who wants to make that part of the language will have a hard time getting through my veto. > "new vector[int]()" used to be invalid cython code too. Right, and although I don't really like reading it, it only works within Cython code that targets C++ (and not pure Python code), so at least it doesn't hurt Python compatibility. > Furthermore, it might also affect the operator[] (but I can't test > that due to bug#2). That would mean that "vect[3]=5" would also be > refused by cython in spite of being valid cython code. That is perfectly valid Python syntax, though. Overloading that to refer to the C++ [] operator when used on a C++ object sounds fine to me. > I understand correct handling of c++ references will be difficult to > solve Absolutely. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
