Help beautify ugly heuristic code

Stuart D. Gathman stuart at
Thu Dec 9 00:38:14 CET 2004

On Wed, 08 Dec 2004 18:00:06 -0500, Mitja wrote:

> On Wed, 08 Dec 2004 16:09:43 -0500, Stuart D. Gathman <stuart at>
> wrote:
>> I have a function that recognizes PTR records for dynamic IPs.... Here
>> is the very ugly code so far.
>> ...
>> # examples we don't yet recognize:
>> ...
> This doesn't help much; post example of all the possible patterns you
> have to match (kind of like the docstring at the beginning, only more
> elaborate), otherwise it's hard to know what kind of code you're trying
> to implement.

This is a heuristic, so there is no exhaustive list or hard rule.
However, I have posted 23K+ examples at
with DYN appended for examples which the current algorithm classifies
as dynamic.

Here are the last 20 (which my subjective judgement says are correct): DYN DYN DYN DYN DYN DYN DYN DYN DYN DYN DYN DYN

More information about the Python-list mailing list