Re: [Python-Dev] Providing support files to assist 3.x extension authors

2010-01-03 Thread Stefan Behnel
Case Vanhorsen, 20.12.2009 01:38: When I ported gmpy (Python to GMP multiple precision library) to Python 3.x, I began to use PyLong_AsLongAndOverflow frequently. I found the code to slightly faster and cleaner than using PyLong_AsLong and checking for overflow. You might want to look at the co

Re: [Python-Dev] Providing support files to assist 3.x extension authors

2009-12-21 Thread Case Vanhorsen
On Sun, Dec 20, 2009 at 12:49 AM, "Martin v. Löwis" wrote: >> Several questions come to mind: >> >> 1) Is it reasonable to provide backward compatibility files (either as >> .h or .c) to provide support to new API calls to extension authors? > > I'm skeptical. In my experience, each extension has

Re: [Python-Dev] Providing support files to assist 3.x extension authors

2009-12-20 Thread Martin v. Löwis
> Several questions come to mind: > > 1) Is it reasonable to provide backward compatibility files (either as > .h or .c) to provide support to new API calls to extension authors? I'm skeptical. In my experience, each extension has different needs, and will also use different strategies to provide

Re: [Python-Dev] Providing support files to assist 3.x extension authors

2009-12-19 Thread Nick Coghlan
Case Vanhorsen wrote: > Hello, > > When I ported gmpy (Python to GMP multiple precision library) to > Python 3.x, I began to use PyLong_AsLongAndOverflow frequently. I > found the code to slightly faster and cleaner than using PyLong_AsLong > and checking for overflow. I looked at making PyLong_As