Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Frank Sievertsen
Hello, I'd still prefer to see a randomized hash()-function (at least for 3.3). But to protect against the attacks it would be sufficient to use randomization for collision resolution in dicts (and sets). What if we use a second (randomized) hash-function in case there are many collisions in ON

Re: [Python-Dev] exception chaining

2012-01-23 Thread Łukasz Langa
Wiadomość napisana przez Ethan Furman w dniu 20 sty 2012, o godz. 21:05:The problem I have with 'raise x from None' is it puts 'from None' clear at the end of linefrom None raise SomeOtherError('etc.')Better yet:with nocontext(): raise SomeOtherError('etc.')But that's python-ideas territory ;)-- Be

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Glenn Linderman
On 1/23/2012 12:53 AM, Frank Sievertsen wrote: What if we use a second (randomized) hash-function in case there are many collisions in ONE lookup. This hash-function is used only for collision resolution and is not cached. So this sounds like SafeDict, but putting it under the covers and aut

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Frank Sievertsen
On 23.01.2012 19:25, Glenn Linderman wrote: So this sounds like SafeDict, but putting it under the covers and automatically converting from dict to SafeDict after a collision threshold has been reached. Let's call it fallback-dict. and costs: * converting the dict from one hash to the othe

Re: [Python-Dev] exception chaining

2012-01-23 Thread Georg Brandl
Am 23.01.2012 15:49, schrieb Łukasz Langa: [graphics] > Pomyśl o środowisku naturalnym zanim wydrukujesz tę wiadomość! > Please consider the environment before printing out this e-mail. Oh please?! Georg ___ Python-Dev mailing list Python-Dev@python.o

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Glenn Linderman
On 1/23/2012 10:58 AM, Frank Sievertsen wrote: On 23.01.2012 19:25, Glenn Linderman wrote: So this sounds like SafeDict, but putting it under the covers and automatically converting from dict to SafeDict after a collision threshold has been reached. Let's call it fallback-dict. and costs:

Re: [Python-Dev] exception chaining

2012-01-23 Thread Łukasz Langa
Wiadomość napisana przez Georg Brandl w dniu 23 sty 2012, o godz. 21:18: > Am 23.01.2012 15:49, schrieb Łukasz Langa: > > [graphics] >> Pomyśl o środowisku naturalnym zanim wydrukujesz tę wiadomość! >> Please consider the environment before printing out this e-mail. > > Oh please?! Excuse me.

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread M.-A. Lemburg
Frank Sievertsen wrote: > Hello, > > I'd still prefer to see a randomized hash()-function (at least for 3.3). > > But to protect against the attacks it would be sufficient to use > randomization for collision resolution in dicts (and sets). > > What if we use a second (randomized) hash-function

Re: [Python-Dev] Counting collisions for the win

2012-01-23 Thread Janzert
On 1/23/2012 1:25 PM, Glenn Linderman wrote: On 1/23/2012 12:53 AM, Frank Sievertsen wrote: What if we use a second (randomized) hash-function in case there are many collisions in ONE lookup. This hash-function is used only for collision resolution and is not cached. So this sounds like SafeD