About the implementation of del in Python 3

Marko Rauhamaa marko at pacujo.net
Thu Jul 6 13:38:49 EDT 2017


Ian Kelly <ian.g.kelly at gmail.com>:

> On Thu, Jul 6, 2017 at 9:41 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> As a good example of the style I'm looking for, take a look at:
>>
>>    <URL: https://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html>
>
> Java reference types have basically the same concept of identity as
> Python objects, so I dug around to find what definition Java uses.

Good for you!

> [...]
> If that language were used for Python, would it suffice for you?

Unfortunately, the Java definition, which does a good job elsewhere,
fails here. Maybe its suggestive of the difficulty of the topic.

Notice that Scheme refers directory to conventional RAM:

   Variables and objects such as pairs, vectors, and strings implicitly
   denote locations or sequences of locations. A string, for example,
   denotes as many locations as there are characters in the string.
   (These locations need not correspond to a full machine word.) [...]

   <URL: http://www.schemers.org/Documents/Standards/R5RS/HTML/r
   5rs-Z-H-6.html#%_sec_3.4>


   The eqv? procedure returns #t if:
   [...]

   * obj1 and obj2 are pairs, vectors, or strings that denote the same
     locations in the store (section 3.4).

   <URL: http://www.schemers.org/Documents/Standards/R5RS/HTML/r
   5rs-Z-H-9.html#%_sec_6.1>


Marko



More information about the Python-list mailing list