[issue38481] Class static property not static
楚艺
report at bugs.python.org
Tue Oct 15 03:36:40 EDT 2019
New submission from 楚艺 <1090217062 at qq.com>:
code:
------------------------------------------------------------------
class D:
num = 0
def __init__(self):
self.num += 1
print('D num', self.num)
for i in range(5):
D()
---------------------------------------------------------------
console print:
---------------------------------------------------------------
Connected to pydev debugger (build 183.5429.31)
D num 1
D num 1
D num 1
D num 1
D num 1
Process finished with exit code 0
----------
components: Windows
messages: 354702
nosy: chuyi, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Class static property not static
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38481>
_______________________________________
More information about the Python-bugs-list
mailing list