Word and tree codes are studied in a common framework, that of polypodeswhich are sets endowed with a substitution like operation. Many examples aregiven and basic properties are examined. The code decomposition theorem isvalid in this general setup.