[Python-ideas] Is there a reason some of the PyLong_As* functions don't call an object's __int__?

Richard Damon Richard at Damon-Family.org
Fri Dec 29 10:23:07 EST 2017

On 12/29/17 9:56 AM, Antoine Pitrou wrote:
> (*) I got curious and went through the maze of type definitions on
> GNU/Linux.  Which gives:
> #define __S32_TYPEDEF __signed__ int
> #define __PID_T_TYPE		__S32_TYPE
> __STD_TYPE __PID_T_TYPE __pid_t;
> typedef __pid_t pid_t;
> Regards
> Antoine.

One quick side note, just because it mapped to signed int on that Linux, 
doesn't mean it will always map to signed int on all Linuxes. One of the 
reasons for the multiple levels of indirection in types is to allow a 
given distribution to configure some parameter types to be 'optimal' for 
that implementation.

Richard Damon

More information about the Python-ideas mailing list