Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Leo Breebaart Newsgroups: comp.lang.python Subject: Re: Data Tree urgent help!!!!!! Date: 20 Feb 2013 10:18:00 GMT Organization: L-Space Lines: 17 Message-ID: References: <4abbe91f-a57e-47de-9cf3-5b9574201c83@googlegroups.com> X-Trace: individual.net D9LzE/BJKZrPcnc5nbWjVwwFZDDpXWvkGqXz8sWF0P7xBQ5g7DFWNjEv8d2ErLoUFA Cancel-Lock: sha1:btdo7F09tG7CxSrKdnPIJ6HD4kc= User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:39334 Peter Otten <__peter__@web.de> writes: > >>> class Name(str): > ... def __repr__(self): > ... return self > ... > >>> apple, pear, dog, cat, fork, spoon = map(Name, "apple pear dog cat fork spoon".split()) Is there any reason why you introduced the Name class? In Python 2.7 this works equally well if I just do: >>> apple, pear, dog, cat, fork, spoon = map(str, "apple pear dog cat fork spoon".split()) So I was wondering why you used Name. -- Leo Breebaart