2008/6/18 Rahul Garg <[EMAIL PROTECTED]>: > I want to add a similar annotation to Python > example usage : > > "pragma parallel for" > for i in xrange(m): a[i] = b[i]*c[i] > > The interpreter ignores such strings and the code will of course > execute serially but such strings can potentially be used by compilers. > Any thoughts on this? What form of annotations would you like to see? > Is it pythonic?
Is the idea to have the annotations completely separated from the executed source? Otherwise, I'd just as well make it implicit: with parallel(i): for i in range(m): a[i] = b[i] * c[i] That is also roughly the form that Fernando implemented for IPython1, and is very intuitive. What have you been using for other annotations so far? Python itself supports at least one other annotation: # encoding: utf-8 so maybe # pragma: parallel for could work. Regards Stéfan _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion