请教一个 python 问题

1 view
Skip to first unread message

google app engine

unread,
Nov 26, 2009, 4:15:34 AM11/26/09
to Google App Engine 中文开发组
大家好,
请教一个python问题

假设文件 a.py里
有一个类
class a():
__G__ = "1111"

在文件b.py里能否实现对a.py里的class a的修改?

比如再添加一个
__G1__ = "1111222"

等同于
a.py里这样定义

class a():
__G__ = "1111"
__G1__ = "1111222"

谢谢

李白,字一日

unread,
Nov 26, 2009, 4:38:25 AM11/26/09
to Google App Engine 中文开发组
呵呵.

这个问题太弱了.

刚试了一下.
直接
a.__C__ = "1111"就可以了.
打扰各位清静.


2009/11/26 google app engine <cali...@gmail.com>
Reply all
Reply to author
Forward
0 new messages