This protects against missing keys in object introspection, etc. when using the pure Python kernel.
addresses #516 and #519
use dict.get(key) instead of dict[key] for pure kernel
This protects against missing keys in object introspection, etc.
when using the pure Python kernel.
Yes, this seems to fix both #516 and #519 for me. Thanks!
Actually, hold on. I may be going a little crazy, but now I'm getting this:
>>> a = 1
i.e. the 2nd time I type a to get it to print out, it prints its value after a prompt. Hitting ESC clears it, and then it prints properly for the next try or two, before it prints incorrectly again. Seems somewhat random how often it occurs.
With any reliability? This code has exactly nothing to do with that. There is technically no guarantee to the ordering of execute replies and output, but there is a tiny sleep between them to make this sort of thing unlikely.
Yeah, there's about a 50% chance for me. You don't see the same? Again, strange that I'm starting to notice all these problems in pure mode only today. Couldn't b7839fa have changed something?
Ah - the tiny sleep is not in the pure Python kernel, only IPython. I just copied it over to pykernel, so it should now be better.
Yet another of the previous bugfixes made in ipkernel not ported to pykernel.
Much better now. Thanks!