Gregory P. Smith added the comment:
Thanks, that makes sense. And it at least less ugly than the __new__ hack I
was thinking of as a workaround. though similar in spirit.
presumably self.append should get the same treatment for completeness given the
PEP 307 text.
I didn't notice a place
Serhiy Storchaka added the comment:
>From PEP 307:
listitemsOptional, and new in this PEP.
If this is not None, it should be an iterator (not a
sequence!) yielding successive list items. These list
items will be pickled, and appended
Richard Levasseur added the comment:
Here's a self-contained repro:
```
import pickle
class MyList(list):
def __init__(self, required, values):
self.required = required
super().__init__(values)
def __getstate__(self):
return self.required
def __setstate__(self, state):
New submission from Gregory P. Smith :
The changes from https://bugs.python.org/issue29368 are causing a subclass of
list trouble:
```
class FieldList(list):
...
def extend(...): ...
```
FieldList has its own extend and append methods that implement additional
checks. As it is a lis