hwi*_*ers 4 python google-app-engine
我需要支持App Engine中的计算属性.我下载了最新的源代码版本以尝试自己实现它们.在浏览代码的过程中,我遇到了一个似乎完全符合我需要的属性类.
class ComputedProperty(Property):
"""Property used for creating properties derived from other values.
Certain attributes should never be set by users but automatically
calculated at run-time from other values of the same entity. These
values are implemented as persistent properties because they provide
useful search keys.
...
"""
Run Code Online (Sandbox Code Playgroud)
它没有文件证明的问题; 我ComputedProperty在官方文档中找不到任何相关内容.
那么ComputedProperty使用安全还是有缺陷或/并且可能会发生变化?
ComputedProperty似乎是一个DerivedProperty来自Nick Johnson博客的自定义属性类的"端口"(缺少一个更好的词).
由于Nick的博客文章显示了创建自定义数据存储Property类是多么容易,我不会太担心ComputedProperty,因为Property如果需要,您可以随时用自己的子类替换它.