Sorry, you're right, I didn't notice the x = plpy.SPIError() test. I did notice that you included the kw != NULL, I was explaining why it really is needed even though it *seems* the code also works without
it.
There's just the doc part left then.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных