8th day of python challenges 111-117

This commit is contained in:
abd.shallal
2019-08-04 15:26:35 +03:00
parent b04c1b055f
commit 627802c383
3215 changed files with 760227 additions and 491 deletions

View File

@@ -0,0 +1,22 @@
# pylint: disable=R0903,W0232, useless-object-inheritance
"""check for scope problems"""
__revision__ = None
class Well(object):
"""well"""
attr = 42
get_attr = lambda arg=attr: arg * 24
# +1: [used-before-assignment]
get_attr_bad = lambda arg=revattr: revattr * 42
revattr = 24
bad_lambda = lambda: get_attr_bad # [undefined-variable]
class Data(object):
"""base hidden class"""
class Sub(Data):
"""whaou, is Data found???"""
attr = Data() # [undefined-variable]
def func(self):
"""check Sub is not defined here"""
return Sub(), self # [undefined-variable]