def copy(self, striptags = None):
		"""
		copy WebpageTemplate to a new instance, optionally stripping away
		some tags that no longer should nor will be overwritten.

		Arguments:
			striptags -- optional dictionary, list or tuple containing
			             tags that should be stripped away.
		"""
		if not striptags:
			return self.__class__(None, self.strings[:], dict(self.tags))
		else:
			stringbuf = []
			tags = {}
			previous_string = self.strings[0]

			for index in range(1, len(self.strings), 2):
				tagname = self.strings[index]
				next_string = self.strings[index + 1] or ''
				if tagname in striptags:
					if isinstance(striptags, dict):
						previous_string = previous_string + \
							striptags[tagname] + next_string
					else:
						previous_string = previous_string + \
							self.tags[tagname] + next_string
				else:
					stringbuf.append(previous_string)
					tags[tagname] = self.tags[tagname]
					stringbuf.append(tagname)
					previous_string = next_string

			stringbuf.append(previous_string)

			return self.__class__(None, stringbuf, tags)

		copy WebpageTemplate to a new instance, optionally stripping away
		some tags that no longer should nor will be overwritten.

		Arguments:
			striptags -- optional dictionary, list or tuple containing
			             tags that should be stripped away.
		
recipes/Python/577203_Userfriendly_Webpage_Template/recipe-577203.py