tobgu/pyrsistent

Public introspection API for fields and checked types

Open

#47 建立於 2015年8月11日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Python (1,943 star) (141 fork)batch import
enhancementhelp wanted

描述

We're about to add some code that introspects pyrsistent classes - in particular PRecord/PClass and the checked data structures - in order to detect changes to our pyrsistent-based configuration model. You can see a sketch of this code here: https://github.com/ClusterHQ/flocker/pull/1836/files#diff-c03885f8c4e64651ea9a499e99090a83R28

Unfortunately this currently requires using private pyrsistent APIs. It would be good to have a public API for finding this information. As a first pass it seems that adding this as extra methods to the classes themselves is problematic, insofar as it means subclasses get extra methods they weren't expecting. So maybe there should be a set of public external functions that extract information from the private implementation details.

貢獻者指南