wangweimin пре 4 година
родитељ
комит
4e34af4b99
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      pywebio/utils.py

+ 1 - 0
pywebio/utils.py

@@ -99,6 +99,7 @@ class ObjectDictProxy:
 
     def __getattr__(self, item):
         """访问一个不存在的属性时触发"""
+        assert not item.startswith('_'), 'object has no attribute %s' % item
         return self._dict.get(item, None)
 
     def __delattr__(self, item):