Re: Lists implemented as integer-hashed Dictionaries?

2009-02-08 Thread Gabriel Genellina
En Sat, 07 Feb 2009 01:18:37 -0200, er eroberer...@gmail.com escribió: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. In addition to all other responses you received, I'd add that lists and

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-08 Thread Gabriel Genellina
En Sat, 07 Feb 2009 01:18:37 -0200, er eroberer...@gmail.com escribió: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. In addition to all other responses you received, I'd add that lists and

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-08 Thread Christian Heimes
er schrieb: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he said that someone else told him this, I piped up and said that I thought that wasn't true. I looked at the source code for lists

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-08 Thread Christian Heimes
Stephen Hansen schrieb: Now, I believe Python sets *are* for all intents and purposes dictionaries, but I think that's just because its the easiest and most efficient way to implement their uniqueness properties; they took the very-well-tuned dictionary implementation and cut out the stuff not

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-08 Thread Terry Reedy
Christian Heimes wrote: Sets are basically dicts without values. For CPython true, but abstractly, dicts are sets with values, and mappings are often viewed as sets of key,value pairs. -- http://mail.python.org/mailman/listinfo/python-list

Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread er
Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he said that someone else told him this, I piped up and said that I thought that wasn't true. I looked at the source code for lists in python, and I

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread er
Correction, the first sentence should read, lists are just dictionaries keyed with integers. On Fri, Feb 6, 2009 at 10:18 PM, er eroberer...@gmail.com wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 7:18 PM, er eroberer...@gmail.com wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he said that someone else told him this, I piped up and said that I thought that

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread er
Thanks Chris. Lua tables are one of my favorite linguistic traits, which was actually part of the discussion that brought up this nugget. Nevertheless, any details you care to provide about the details. I'm going to dive into the source code in more depth tomorrow, just so I can get a better

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 10:25 PM, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 6, 2009 at 7:18 PM, er eroberer...@gmail.com wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Stephen Hansen
On Fri, Feb 6, 2009 at 7:32 PM, er eroberer...@gmail.com wrote: Thanks Chris. Lua tables are one of my favorite linguistic traits, which was actually part of the discussion that brought up this nugget. Nevertheless, any details you care to provide about the details. I'm going to dive into

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Terry Reedy
er wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Abstractly, which is to say, behaviorally, a Python list is a sequence class as defined under Built-in Types in the Library manual.