This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] libstdc++/77645 fix deque and vector xmethods for Python 3
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Joe Buck <Joe dot Buck at synopsys dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 Sep 2016 18:37:41 +0100
- Subject: Re: [PATCH] libstdc++/77645 fix deque and vector xmethods for Python 3
- Authentication-results: sourceware.org; auth=none
- References: <20160919171125.GA31777@redhat.com> <CCD865889A560649BA947E1B934A8D7D01A98F33B8@us01wembx1.internal.synopsys.com>
On 19/09/16 17:24 +0000, Joe Buck wrote:
Python has a distinct integer division operator, "//". 7 // 3 returns the integer 2.
Python 3 does, but Python 2 doesn't have it unless you import it from
__future, and I don't know how far back that works. I don't want to
introduce a fix for Python 3 that breaks it for old systems.
Using a cast is clear and (AFAIK) works with all versions.