[issue35339] Populating instances of class automatically

Daugeras report at bugs.python.org
Wed Nov 28 12:05:42 EST 2018


New submission from Daugeras <emmanuel.daugeras at nextelyo.com>:

Hello, I am not sure it is a bug, but it is a very strange behavior of Python, which I do not understand.

I created a class (mainly a structure) and instantiated an object of this class in a first function (Object 1). The function populates Object 1.
In another function, I instantiate another object of the same class (Object 2) , and Object 2 is automatically populated with the data of Object 1. Note than Object 1 and Object 2 have different memory adresses.

This behavior is very strange. Is it normal for Python or is it a Bug ?

----------
messages: 330613
nosy: Daugeras
priority: normal
severity: normal
status: open
title: Populating instances of class automatically
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35339>
_______________________________________


More information about the Python-bugs-list mailing list