python class snippet fix