On Tue, Apr 28, 2015 at 4:59 PM, Barry Warsaw wrote:
> On Apr 28, 2015, at 11:13 AM, Victor Stinner wrote:
>
>>It would be nice to have a six module for C extensions. I'm quite sure
>>that many projects are already full of #ifdef PYTHON3 ... #else ...
>>#endif macros.
>
> Maybe encapsulating some
On Tue, Apr 28, 2015 at 11:13 AM, Victor Stinner
wrote:
> Hi,
>
> 2015-04-27 16:02 GMT+02:00 Petr Viktorin :
>> A macro like this would reduce boilerplate in stdlib and third-party C
>> extensions. It would ease porting C extensions to Python 3, where rich
>> comparison is mandatory.
>
> It would
On Tue, 2015-04-28 at 10:50 -0700, Glenn Linderman wrote:
> On 4/28/2015 2:13 AM, Victor Stinner wrote:
>
> > > #define Py_RETURN_RICHCOMPARE(val1, val2, op)
> > > \
> > > > do {
> > > > \
> > >
On 4/28/2015 2:13 AM, Victor Stinner wrote:
#define Py_RETURN_RICHCOMPARE(val1, val2, op) \
> do {\
> switch (op) { \
> case
On Apr 28, 2015, at 11:13 AM, Victor Stinner wrote:
>It would be nice to have a six module for C extensions. I'm quite sure
>that many projects are already full of #ifdef PYTHON3 ... #else ...
>#endif macros.
Maybe encapsulating some of the recommendations here:
https://wiki.python.org/moin/Port
Hi,
2015-04-27 16:02 GMT+02:00 Petr Viktorin :
> A macro like this would reduce boilerplate in stdlib and third-party C
> extensions. It would ease porting C extensions to Python 3, where rich
> comparison is mandatory.
It would be nice to have a six module for C extensions. I'm quite sure
that m
It seems the discussion on python-ideas, and also the patch review,
died down. So I'm posting to python-dev.
A macro like this would reduce boilerplate in stdlib and third-party C
extensions. It would ease porting C extensions to Python 3, where rich
comparison is mandatory.
#define Py_RETURN_RIC