Message356277
Hello,
This is my first bug report. While doing some homework i came to realize that the __init__ of a class was taking out of context variables.
class Foo(object):
def __init__(self, attr1):
self.out_of_context = out_of_context
# Raises NameError as it is expected
foo = Foo('some attr')
# 'bar' is bounded to 'out_of_context' although it was initialized
# with value 'some value'
out_of_context = 'bar'
foo = Foo('some value')
print(foo.out_of_context') # prints 'bar' |
|
Date |
User |
Action |
Args |
2019-11-09 01:07:28 | sebasbeco | set | recipients:
+ sebasbeco, asvetlov, yselivanov |
2019-11-09 01:07:28 | sebasbeco | set | messageid: <1573261648.24.0.116935582519.issue38752@roundup.psfhosted.org> |
2019-11-09 01:07:28 | sebasbeco | link | issue38752 messages |
2019-11-09 01:07:27 | sebasbeco | create | |
|