[issue33599] Copying objects subclassed from SimpleNamespace doesn't work
Sascha
report at bugs.python.org
Tue May 22 05:56:10 EDT 2018
New submission from Sascha <sascha.schlemmer at me.com>:
Try
from types import SimpleNamespace
import copy
class Person(SimpleNamespace):
def __init__(self, name, **kwargs):
self.name = name
super().__init__(**kwargs)
bob = Person('Bob', job='tester')
clone = copy.copy(bob)
For me this results in
TypeError: __init__() missing 1 required positional argument: 'name'
----------
components: Library (Lib)
messages: 317266
nosy: stereobutter
priority: normal
severity: normal
status: open
title: Copying objects subclassed from SimpleNamespace doesn't work
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33599>
_______________________________________
More information about the Python-bugs-list
mailing list