Data Tree urgent help!!!!!!

Leo Breebaart leo at lspace.org
Wed Feb 20 05:18:00 EST 2013


Peter Otten <__peter__ at 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  <leo at lspace.org>



More information about the Python-list mailing list