
March 22, 2012
1:33 a.m.
2012/3/22 Armin Rigo <arigo@tunes.org>:
On Wed, Mar 21, 2012 at 20:46, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
Persistent.__getstate__ uses _PyObject_GetDictPtr(), which always returns NULL in cpyext.
Does it make sense? Shouldn't it be unimplemented, or raise a warning, or something?
The first time I encountered this function it was in SWIG generated code: https://github.com/klickverbot/swig/blob/244c758f0d32d19856d1e69011aa79f5bf3... which gracefully falls back to a regular PyObject_GetAttr() if the dict pointer is not provided. -- Amaury Forgeot d'Arc