alexmojaki / alexmojaki/cheap_repr

dnspython

オープン
#10 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
26
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

I am using cheap-repr for debugging of https://github.com/jayvdb/dns-cache , and the problem I am facing is that https://github.com/rthalley/dnspython has a bunch of classes with a useless `repr`, and they are deeply nested.

The main need for me is the "Answer" class from [`dns.resolver.Resolver.query()`](https://github.com/rthalley/dnspython/blob/fb55767/dns/resolver.py#L804).

I can get a slightly better result by using `register_repr` and returning `x.__dict__`, but then the `response` member is the same, and then if I use its `__dict__`, there is another layer (and that is where the IP addrs, which is what is the most interesting part of the answer).

It would be great if there was a 'recursive `__dict__` repr' which could be easily used.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。