Author serhiy.storchaka
Recipients Arfrever, Giovanni.Bajo, PaulMcMillan, ReneSac, Vlado.Boza, alex, arigo, benjamin.peterson, camara, christian.heimes, cvrebert, dmalcolm, gregory.p.smith, koniiiik, lemburg, mark.dickinson, sbermeister, serhiy.storchaka, vstinner, Łukasz.Rekucki
Date 2012-11-30.21:27:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> try:
>     mapping = {}
>     mapping.max_collisions = 100
>     mapping.update(source)
> except CollisionLimitError:
>     return 'no thank you'

May be use a more general solution?

    with run_with_timeout(timeout=100, timer=collisions_count):
        mapping = insert_untrusted_data(source)
except TimeoutError:
    return 'no thank you'

(You can can use different measurement for timeout: user time, real time, ticks 
count, collisions count, or even a user defined timer).
Date User Action Args
2012-11-30 21:27:24serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, arigo, gregory.p.smith, mark.dickinson, vstinner, christian.heimes, benjamin.peterson, Arfrever, alex, cvrebert, dmalcolm, Giovanni.Bajo, PaulMcMillan, Vlado.Boza, koniiiik, sbermeister, camara, Łukasz.Rekucki, ReneSac
2012-11-30 21:27:24serhiy.storchakalinkissue14621 messages
2012-11-30 21:27:24serhiy.storchakacreate