From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 12 Apr 2014 09:58:36 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: Heartbleed Date: Sat, 12 Apr 2014 10:58:42 -0400 Organization: IISS Elusive Unicorn Message-ID: <8bkik9l62pbpd6a0pqd9pul21l07p4nvi6@4ax.com> References: <1ljwj8f.1wqbhvuabsdw1N%csampson@inetworld.net> <51c7d6d4-e3be-44d5-a4ce-f7e875345588@googlegroups.com> <%J32v.70539$kp1.45343@fx14.iad> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.73.119.12 X-Trace: sv3-cTG8646niZsGOqbTWy37mBxFiIgPYskll/EYJKaG68vtqlrrpNW4bLLX3NZ12eK/x6ObR3baC5RcDtJ!pLuCnsO3HFOxvp336XwLeZcw0cy5tfIvHIPyfP60byanRps5wDjkWYN5pJHvxgIYBXyGPwF9s1qd!RGEGGb7poecfYE2kR7AmhO9ONwE= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2869 Xref: number.nntp.dca.giganews.com comp.lang.ada:185702 Date: 2014-04-12T10:58:42-04:00 List-Id: On Sat, 12 Apr 2014 02:15:44 -0500, "Nasser M. Abbasi" declaimed the following: >Python also is weakly typed. R is also the same. Same Python is very strongly typed... But the .names/ referring to objects are not typed. X = 1 X = 3.14 Y = X translates into: Create an integer object with the value 1 somewhere in memory (small integers tend to be cached, so the object may already exist); attach the name X to that object Create a float object with the value 3.14 somewhere in memory; remove the name X from the integer object (which, if no other names are attached, is now free to be garbage collected) and attach it to the float object Attach the name Y to the object that currently has the name X; the object now has two names attached No operations in Python will ever change the type of the object itself. You can only transform the value by creating a new object Z = int(Y) obtain the value of the object to which the name Y is attached, convert that value to an integer creating a new integer object somewhere in memory, attach the name Z to that object. >>> X = 1 >>> id(X) 4473416L >>> X = 3.14 >>> id(X) 4534928L >>> id(1) 4473416L Cached small integer, same object as first assignment >>> Y = X >>> id(Y) 4534928L >>> id(X) 4534928L X and Y are two names for the same object >>> Z = int(Y) >>> id(Z) 4473368L >>> id(3) 4473368L >>> Cached small integer -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/