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