What other languages use the same data model as Python?

Chris Angelico rosuav at gmail.com
Wed May 4 22:43:04 EDT 2011


On Thu, May 5, 2011 at 7:43 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> * that the paper tag is tied to only one object
>
> * that a paper tag tied to no object is rather useless
>
> * that many paper tags can be tied to the same object

I disagree minorly; a tag tied to no object is quite useful in some
circumstances. You can ditch the concept by having a special object
that's called "No Object" (Python does this, with None), or you can
allow your tag to point nowhere (C does this, with null pointers). The
difference is semantic; either way, your tag can point to any object
or it can point nowhere. (Pike goes for a slightly different approach;
any variable, regardless of its stated types, may legally hold the
integer 0. It acts somewhat as a null pointer, but it isn't really.)

Chris Angelico



More information about the Python-list mailing list