Re: [vwrap] Python integer types (was: The <embed> tag... is the group still interested in LLSD or DSD?)

Meadhbh Hamrick <ohmeadhbh@gmail.com> Sat, 07 May 2011 15:56 UTC

Return-Path: <ohmeadhbh@gmail.com>
X-Original-To: vwrap@ietfa.amsl.com
Delivered-To: vwrap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 89741E06DD for <vwrap@ietfa.amsl.com>; Sat, 7 May 2011 08:56:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.299
X-Spam-Level:
X-Spam-Status: No, score=-3.299 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, J_CHICKENPOX_36=0.6, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3+kNwJibhbWJ for <vwrap@ietfa.amsl.com>; Sat, 7 May 2011 08:56:06 -0700 (PDT)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by ietfa.amsl.com (Postfix) with ESMTP id 72C77E0682 for <vwrap@ietf.org>; Sat, 7 May 2011 08:56:06 -0700 (PDT)
Received: by wyb29 with SMTP id 29so3503564wyb.31 for <vwrap@ietf.org>; Sat, 07 May 2011 08:56:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=rLxl912q8rXWxcGcxz/z3ajkNhHAPR7HltAZ4NFC9Hc=; b=TrBNSynKGONHWD3vUQZWNFe2yn21sqNMXrmGA1p3sBml1xIwDCixmLgc68d0cIsSoG XVp4U0WsqI9uTrkJe4qyquzuG+1yo1Zb6O2+7VyGdKzhAEqZD3y5pf/zcxYY78Io7gBc NbdlIv4hezhigY4lS0QmI/nNYAP+Tu5d3AeFQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=mL5ZQSBddksp2bZAJPen2V2Jz2TVaC+8W6tFGK8RLlg0Mj+L2DSi+mHqC8ML8thG+3 55gGO+RpKeNmbOQSX0ERQawhmX57HJMANnFMRnRrbrPWHMIJn9rQ2fPUHa4klqbhtxw8 f16KLb1aWYHl7dddP27O8uHP5MMvot+gKuLmY=
Received: by 10.216.145.206 with SMTP id p56mr780895wej.80.1304783269093; Sat, 07 May 2011 08:47:49 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.216.154.1 with HTTP; Sat, 7 May 2011 08:47:29 -0700 (PDT)
In-Reply-To: <4DC561BC.3040309@boroon.dasgupta.ch>
References: <BANLkTi=g9T5q5bVgytpxRxuE=Oc9iG2F9w@mail.gmail.com> <4DC15504.3090503@gmail.com> <BANLkTikay4xhQoZs2L0uRLSXgUMfCE9yfA@mail.gmail.com> <4DC160F0.1030201@gmail.com> <BANLkTikTYpLHM=GAeGAVfufqZ5XT0FSAzw@mail.gmail.com> <BANLkTi=kjBSuMjPcgfXTUvZ3iwmS1bN50Q@mail.gmail.com> <4DC17704.3020201@gmail.com> <BANLkTimpGpNrkE3WUdurduqrVumocDRwfQ@mail.gmail.com> <4DC1824B.6040609@gmail.com> <BANLkTi=hhsiDs=fdZRsthp_+5Hs+pR4L6A@mail.gmail.com> <4DC1956A.5020204@gmail.com> <BANLkTik8rnsKP4xq+Gj5G4dsG=UOVnkNSQ@mail.gmail.com> <4DC1A8C9.9090406@gmail.com> <BANLkTikkOS34CC+ML0JNJgHDoRqbs9rY9w@mail.gmail.com> <4DC1D165.7010705@gmail.com> <4DC1D5FC.6040608@gmail.com> <BANLkTik81Eht3NTdLXXmgqOWvjc2s_KBnw@mail.gmail.com> <BANLkTi=-heHa35w43te0ba8NufkT+MP+CQ@mail.gmail.com> <BANLkTin6ExR7+xpodbtoTAS_4WyhUXL92Q@mail.gmail.com> <BANLkTikjKib79_rLR_s2X=X-ss-+V_yw+w@mail.gmail.com> <BANLkTim4aY7oNALbOfZ2V-htivVmQJZDiA@mail.gmail.com> <BANLkTi=7MDUAfjJb697uRwrrxB-4v5fQ3A@mail.gmail.com> <4DC561BC.3040309@boroon.dasgupta.ch>
From: Meadhbh Hamrick <ohmeadhbh@gmail.com>
Date: Sat, 7 May 2011 08:47:29 -0700
Message-ID: <BANLkTimOoMQRpbW8qrHb9tetmuo0-C558w@mail.gmail.com>
To: Boroondas Gupte <sllists@boroon.dasgupta.ch>
Content-Type: text/plain; charset=ISO-8859-1
Cc: vwrap@ietf.org
Subject: Re: [vwrap] Python integer types (was: The <embed> tag... is the group still interested in LLSD or DSD?)
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group <vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/vwrap>, <mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>, <mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 07 May 2011 15:56:07 -0000

blarg. you're right. looks like python moved from using c int's for
python ints to using c longs back in 2.2.
--
meadhbh hamrick * it's pronounced "maeve"
@OhMeadhbh * http://meadhbh.org/ * OhMeadhbh@gmail.com



On Sat, May 7, 2011 at 8:14 AM, Boroondas Gupte
<sllists@boroon.dasgupta.ch>; wrote:
> On 05/07/2011 09:45 AM, Dahlia Trimble wrote:
>
> I believe python supports very large integers. Try this in your python
> interpreter:
>
>>>> bigint = 2**(2**16)
>>>> print bigint
>
> In fact, python features two built-in integer types:
>
> plain integers (int)
> long integers (long)
>
> According to the python documentation on built-in numeric types, python's
> int is implemented using long in C. This means it has at least 32 bits, but
> can be larger on certain systems. E.g. on a 64bit Linux, it'll be 64 bits
> long, as I've just verified myself:
>
>>>> import sys
>>>> 2 ** 63 - 1 == sys.maxint
> True
>
> Python's long is unlimited in size (at the cost of performance).
> Conveniently, python converts from int to long as needed, even if no longs
> are amongst the operands:
>
>>>> sys.maxint
> 9223372036854775807
>>>> sys.maxint + 1
> 9223372036854775808L
>
> (The L postfix indicates a long literal.) Conversion from long to int
> doesn't happen implicitly, but can be done explicitly if wanted.
>
> Cheers,
> Boroondas
>
> _______________________________________________
> vwrap mailing list
> vwrap@ietf.org
> https://www.ietf.org/mailman/listinfo/vwrap
>
>