From d975139bb95aee2dbc5fa1675dd7eaa5ea250b57 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 29 Jul 2001 09:48:51 +0000 Subject: [PATCH] Grab co-authorship; added list of things that will/may change; added alternative implementation. --- pep-0237.txt | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/pep-0237.txt b/pep-0237.txt index 9465b60f1..4033e953e 100644 --- a/pep-0237.txt +++ b/pep-0237.txt @@ -1,7 +1,7 @@ PEP: 237 Title: Unifying Long Integers and Integers Version: $Revision$ -Author: pep@zadka.site.co.il (Moshe Zadka) +Author: pep@zadka.site.co.il (Moshe Zadka), guido@python.org (Guido van Rossum) Status: Draft Type: Standards Track Created: 11-Mar-2001 @@ -18,6 +18,10 @@ Abstract types from the perspective of both the Python interpreter and the C API. + Note from second author: this PEP requires more thought about + implementation details. I've started to make a list of semantic + differences but I doubt it's complete. + Rationale @@ -72,9 +76,39 @@ Overflows aid, and has no guaranteed semantics. +Semantic Differences + + The following operations have (usually subtly) different semantics + for short and for long integers, and one will have to change + somehow. This is intended to be an exhaustive list; if you know + of anything else that might change, please write the author. + + - Currently, all arithmetic operators on short ints except << + raise OverflowError if the result cannot be represented as a + short int. This will change (of course). + + - Currently x<