gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / functional / newstyle__slots__.py @ 745
History | View | Annotate | Download (318 Bytes)
1 |
# pylint: disable=R0903
|
---|---|
2 |
"""test __slots__ on old style class"""
|
3 |
|
4 |
|
5 |
class NewStyleClass(object): |
6 |
"""correct usage"""
|
7 |
__slots__ = ('a', 'b') |
8 |
|
9 |
|
10 |
class OldStyleClass: # <3.0:[old-style-class,slots-on-old-class] |
11 |
"""bad usage"""
|
12 |
__slots__ = ('a', 'b') |
13 |
|
14 |
def __init__(self): |
15 |
pass
|
16 |
|
17 |
__slots__ = 'hop'
|