-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed as not planned
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement
Description
Bug report
Right now you can't pickle string.templatelib.TemplateIter
objects. I missed it during my pickle
PR.
Demo:
>>> import pickle
>>> pickle.dumps(iter('abc'))
b'\x80\x05\x95"\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94\x8c\x03abc\x94\x85\x94R\x94K\x00b.'
>>> pickle.dumps(iter(t'abc'))
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
pickle.dumps(iter(t'abc'))
~~~~~~~~~~~~^^^^^^^^^^^^^^
TypeError: cannot pickle 'string.templatelib.TemplateIter' object
I think that it should be fixed. I will send a PR with code and tests soon.
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement