python: fix a reference leak in the (>py) word