[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Dual look-up on keys?

Aaron Brady

3/5/2008 6:59:00 PM

I want to hash values to keys. How do the alternatives compare?
22 Answers

Diez B. Roggisch

3/5/2008 7:13:00 PM

0

castironpi@gmail.com schrieb:
> I want to hash values to keys. How do the alternatives compare?

http://catb.org/~esr/faqs/smart-ques...

Aaron Brady

3/5/2008 8:06:00 PM

0

On Mar 5, 1:13 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> castiro...@gmail.com schrieb:
>
> > I want to hash values to keys.  How do the alternatives compare?
>
> http://catb.org/~esr/faqs/smart-ques...

... without extending the whole way to a full relational database?

Steven D'Aprano

3/5/2008 9:39:00 PM

0

On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:

> On Mar 5, 1:13 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
>> castiro...@gmail.com schrieb:
>>
>> > I want to hash values to keys.  How do the alternatives compare?
>>
>> http://catb.org/~esr/faqs/smart-ques...
>
> ... without extending the whole way to a full relational database?



You didn't bother following the link and reading the advice, did you? If
you did, you haven't done a good job of following that advice.



--
Steven

Aaron Brady

3/5/2008 9:53:00 PM

0

On Mar 5, 3:38 pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> >> castiro...@gmail.com schrieb:
>
> >> > I want to hash values to keys.  How do the alternatives compare?
>
> >>http://catb.org/~esr/faqs/smart-ques...
>
> > ... without extending the whole way to a full relational database?
>
> You didn't bother following the link and reading the advice, did you? If
> you did, you haven't done a good job of following that advice.

Well, obviously there's someone who's interested in computers and
programming that has a question. Communication is not his forte, but
effort, willingness, devotion, and dedication are. What should he do,
and what should the others, who are gifted speakers?

Grant Edwards

3/5/2008 10:01:00 PM

0

On 2008-03-05, castironpi@gmail.com <castironpi@gmail.com> wrote:

>>>>> I want to hash values to keys.  How do the alternatives compare?
>>
>>>>http://catb.org/~esr/faqs/smart-ques...
>>
>>> ... without extending the whole way to a full relational database?
>>
>> You didn't bother following the link and reading the advice, did you? If
>> you did, you haven't done a good job of following that advice.
>
> Well, obviously there's someone who's interested in computers and
> programming that has a question.

It may be obvious that he has a question. It's not the least
bit obvious what that question is.

> Communication is not his forte, but effort, willingness,
> devotion, and dedication are. What should he do, and what
> should the others, who are gifted speakers?

He should spend less time trying to generate "gifted speach"
and more time learning how to ask an understandable, meaningful
question. The link which you ignored explains how to do that.

In your original post, it's not very clear what you mean by
"hash values to keys" means nor what alternatives you're asking
about. If you're trying to learn about hashing algorithms, then
google "hashing algorithms" and read the first half-dozen hits.

The first two are Wikipedia articles which are both quite good
and are almost certainly available in your native lanauge.

--
Grant Edwards grante Yow! But they went to MARS
at around 1953!!
visi.com

Aaron Brady

3/5/2008 10:08:00 PM

0

On Mar 5, 3:38 pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> >> castiro...@gmail.com schrieb:
>
> >> > I want to hash values to keys.  How do the alternatives compare?
>
> >>http://catb.org/~esr/faqs/smart-ques...
>
> > ... without extending the whole way to a full relational database?
>
> You didn't bother following the link and reading the advice, did you? If
> you did, you haven't done a good job of following that advice.

Well, obviously there's someone who's interested in computers and
programming that has a question. Communication is not his forte, but
effort, willingness, devotion, and dedication are. What should he do,
and what should the others, who are gifted speakers?

Steven D'Aprano

3/5/2008 10:12:00 PM

0

On Wed, 05 Mar 2008 13:52:38 -0800, castironpi wrote:

> On Mar 5, 3:38 pm, Steven D'Aprano <st...@REMOVE-THIS-
> cybersource.com.au> wrote:
>> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
>> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
>> >> castiro...@gmail.com schrieb:
>>
>> >> > I want to hash values to keys.  How do the alternatives compare?
>>
>> >>http://catb.org/~esr/faqs/smart-ques...
>>
>> > ... without extending the whole way to a full relational database?
>>
>> You didn't bother following the link and reading the advice, did you?
>> If you did, you haven't done a good job of following that advice.
>
> Well, obviously there's someone who's interested in computers and
> programming that has a question. Communication is not his forte, but
> effort, willingness, devotion, and dedication are. What should he do,


Read the "Smart Questions" page and follow the advice in it.

Sheesh.



--
Steven

Diez B. Roggisch

3/5/2008 10:20:00 PM

0

castironpi@gmail.com schrieb:
> On Mar 5, 3:38 pm, Steven D'Aprano <st...@REMOVE-THIS-
> cybersource.com.au> wrote:
>> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
>>> On Mar 5, 1:13 pm, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
>>>> castiro...@gmail.com schrieb:
>>>>> I want to hash values to keys. How do the alternatives compare?
>>>> http://catb.org/~esr/faqs/smart-ques...
>>> ... without extending the whole way to a full relational database?
>> You didn't bother following the link and reading the advice, did you? If
>> you did, you haven't done a good job of following that advice.
>
> Well, obviously there's someone who's interested in computers and
> programming that has a question. Communication is not his forte, but
> effort, willingness, devotion, and dedication are. What should he do,

Effort, willingness & devotion? Certainly - but only to provoke, mislead
and twaddle.

You have recieved more than enough earnest efforts to be helped, and yet
proven again and again that you aren't worth these very efforts.

Luckily, this group is nice enough to not let your attitude poison it.

*plonk*

Diez

Aaron Brady

3/5/2008 10:51:00 PM

0

On Mar 5, 4:00 pm, Grant Edwards <gra...@visi.com> wrote:
> On 2008-03-05, castiro...@gmail.com <castiro...@gmail.com> wrote:
>
> >>>>> I want to hash values to keys.  How do the alternatives compare?
>
> >>>>http://catb.org/~esr/faqs/smart-ques...
>
> >>> ... without extending the whole way to a full relational database?
>
> >> You didn't bother following the link and reading the advice, did you? If
> >> you did, you haven't done a good job of following that advice.
>
> > Well, obviously there's someone who's interested in computers and
> > programming that has a question.
>
> It may be  obvious that he has a question.  It's not the least
> bit obvious what that question is.
>
> > Communication is not his forte, but effort, willingness,
> > devotion, and dedication are.  What should he do, and what
> > should the others, who are gifted speakers?
>
> He should spend less time trying to generate "gifted speach"
> and more time learning how to ask an understandable, meaningful
> question.  The link which you ignored explains how to do that.
>
> In your original post, it's not very clear what you mean by
> "hash values to keys" means nor what alternatives you're asking
> about. If you're trying to learn about hashing algorithms, then
> google "hashing algorithms" and read the first half-dozen hits.
>
> The first two are Wikipedia articles which are both quite good
> and are almost certainly available in your native lanauge.
>
> --
> Grant Edwards                   grante             Yow! But they went to MARS
>                                   at               around 1953!!
>                                visi.com            

Are you vegetarian? A little off topic.

Anyway, if (a,b) is a key in dictionary d, can it guarantee that (b,a)
is also in it, and maps to the same object?

Steven D'Aprano

3/5/2008 11:19:00 PM

0

On Wed, 05 Mar 2008 14:51:04 -0800, castironpi wrote:

> Anyway, if (a,b) is a key in dictionary d, can it guarantee that (b,a)
> is also in it, and maps to the same object?

It would take you approximately five seconds to answer that question for
yourself.

>>> D = {(1,2): "x"}
>>> D[(2,1)]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: (2, 1)


You've already been plonked by one long-time regular today. Are you
aiming to get plonked by *everybody*?

http://en.wikipedia.org/...



--
Steven