If setting them to PyAttributeDeleted makes them disappear from the list, then the place where we set them to "" is the problem. It looks right, but it's still an object in the dictionary.
The dir() function is defined in __builtins__.java . If you set a breakpoint there you could follow the action. At some point there is a map and dir() is enumerating its keys. Does that enumeration contain a skip when the value is PyAttributeDeleted? It probably should. Either that or we have to delete the prompts from the dictionary instead of setting them to "" or the PyAttributeDeleted singleton.