Vincouux opened a new issue, #173:
URL: https://github.com/apache/pulsar-client-python/issues/173
### Version
OS: Ubuntu 22.04
Python: 3.10.2
Pulsar: pulsar-client==3.2.0
### Minimal reproduce step
```python3
from pulsar.schema import Record, Array, Integer
class A(Record):
a = Array(Integer(), required=False, default=[])
# Create a first instance of object A
a = A()
a.a # Correctly show empty list
a.a.append(1) # Adding an integer
a.a # Correctly showing list with single element 1 inside
# Instanciating a second object A
b = A()
b.a # Incorrectly show list with single element 1
```
### What did you expect to see?
I expected the A class not to re-use the previous reference to the list.
### What did you see instead?
As a developer, instantiating a fresh object in Python generally means it's
built from scratch. Therefore, no reference to previously built objects should
be used.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]