code used to downcast rc_Pot objects to the correct specific Pot this is lowlevel code which should not be normally used in scripts.