Summary: The electrochemical polymerization of diphenylamine (DPA) onto electrodes of Pt coated with highly separated metallic (98%) or semiconducting (99%) single-walled carbon nanotubes (SWCNTs) in the presence of H3PW12O40 was performed by cyclic voltammetry in order to obtain composite materials based on polydiphenylamine (PDPA) doped with heteropolyanions of H3PW12O40 and carbon nanotubes. Our data demonstrate that the photoluminescence quenching effect of the PDPA doped with H3PW12O40 heteropolyanions in the presence of SWCNTs is due to the metallic component. Under UV irradiation of SWCNTs highly separated in metallic and semiconducting tubes functionalized with PDPA doped with heteropolyanions of H3PW12O40 new photochemical reactions are evidenced by photoluminescence studies. These reactions lead to a shortening of the macromolecular chain of PDPA. The photochemical process is more intense in the case semiconducting SWCNTs functionalized with PDPA doped with heteropolyanions in comparison to metallic SWCNTs functionalized with PDPA in doped state, it being a consequence of an additional chemical interaction between the DPA dimer doped with H3PW12O40 heteropolyanions and semiconducting SWCNTs.