Re: [Cython] Cython and Py2.6/Py2.7 format() differences: '{}' vs. '{0}'

2013-07-05 Thread Stefan Behnel
Yury V. Zaytsev, 05.07.2013 23:01: > On Fri, 2013-07-05 at 15:52 +0200, Stefan Behnel wrote: >> Cython has nothing to do with this. > > Well, Cython does abstract differences for instance in terms of string > handling between Py2.x and Py3.x, so that in fact one can enjoy it as a > "porting" inst

Re: [Cython] Cython and Py2.6/Py2.7 format() differences: '{}' vs. '{0}'

2013-07-05 Thread Yury V. Zaytsev
On Fri, 2013-07-05 at 15:52 +0200, Stefan Behnel wrote: > > Cython has nothing to do with this. Well, Cython does abstract differences for instance in terms of string handling between Py2.x and Py3.x, so that in fact one can enjoy it as a "porting" instrument. But thank you for the verdict and y

Re: [Cython] Cython and Py2.6/Py2.7 format() differences: '{}' vs. '{0}'

2013-07-05 Thread Stefan Behnel
Yury V. Zaytsev, 05.07.2013 14:40: > I have just discovered that if one uses Python 2.7 constructs in the > code like > > print("Object: {}".format(obj)) > > the resulting C++ module compiles just fine with both Python 2.6 and > Python 2.7 headers, however, in the former case, ValueError is r

[Cython] Cython and Py2.6/Py2.7 format() differences: '{}' vs. '{0}'

2013-07-05 Thread Yury V. Zaytsev
Hi, I have just discovered that if one uses Python 2.7 constructs in the code like print("Object: {}".format(obj)) the resulting C++ module compiles just fine with both Python 2.6 and Python 2.7 headers, however, in the former case, ValueError is raised at runtime: ValueError: zero leng