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.

newstyle__slots__.py 318B

1234567891011121314151617
  1. # pylint: disable=R0903
  2. """test __slots__ on old style class"""
  3. class NewStyleClass(object):
  4. """correct usage"""
  5. __slots__ = ('a', 'b')
  6. class OldStyleClass: # <3.0:[old-style-class,slots-on-old-class]
  7. """bad usage"""
  8. __slots__ = ('a', 'b')
  9. def __init__(self):
  10. pass
  11. __slots__ = 'hop'