Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

func_noerror_class_attributes.py 389B

1234567891011121314151617
  1. """Test that valid class attribute doesn't trigger errors"""
  2. __revision__ = 'sponge bob'
  3. class Clazz(object):
  4. "dummy class"
  5. def __init__(self):
  6. self.topic = 5
  7. self._data = 45
  8. def change_type(self, new_class):
  9. """Change type"""
  10. self.__class__ = new_class
  11. def do_nothing(self):
  12. "I do nothing useful"
  13. return self.topic + 56