Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39346

Re: Data Tree urgent help!!!!!!

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'subject:help': 0.07; 'python': 0.09; 'fork': 0.09; 'def': 0.10; '2.7': 0.13; 'dog': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'why,': 0.16; 'wed,': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'feb': 0.19; 'sorry,': 0.22; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'wondering': 0.26; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'cat': 0.29; "d'aprano": 0.29; 'steven': 0.29; 'strings,': 0.29; 'writes:': 0.29; 'skip:_ 10': 0.29; 'class': 0.29; "i'm": 0.29; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'self': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; '20,': 0.65; 'subject:Data': 0.65; '2013': 0.84; 'leo': 0.84; 'otten': 0.84; 'pear': 0.84; 'do:': 0.91; 'mind...': 0.91; 'subject:urgent': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=oHBtV6J9djZFRbO7F73KAGDm6fZB9xFHaofRs9gN5FQ=; b=RUlMe/YLDzvYv6T1E5btsmgGdSgyzHXgs76U7ceJjsh8ubgBvcMphNa+dghbRy2icS 1Vmcj18ZNBK4BxWDAccJLnUqsVMHb3U2Obqa+1aKRNX3kHehA7ACGZeq2aBgCIdcrwr6 Lm1D5JBYdAipyFngbZ7lz4cIqiv/Byh2vIlrgNYUqt/QbVe0+HqQQQamH9HQ7cgCxsJ0 Ic/zrhNxMIUl3bdDyl/simvbAvGRKYhv62Euo4+bUzBuaXeCRLnHciDvxrb7kEhc+J5h cJhQS7xupd6P4Myulmvu4PIFwm33KiypeyAqkm5Py5SksIlD2A1CqOCykic25FWxS2hb WOuQ==
MIME-Version 1.0
X-Received by 10.220.150.136 with SMTP id y8mr24833158vcv.34.1361358995609; Wed, 20 Feb 2013 03:16:35 -0800 (PST)
In-Reply-To <5124ad18$0$29975$c3e8da3$5496439d@news.astraweb.com>
References <4abbe91f-a57e-47de-9cf3-5b9574201c83@googlegroups.com> <mailman.2018.1361277272.2939.python-list@python.org> <aojm6oFu09lU1@mid.individual.net> <5124ad18$0$29975$c3e8da3$5496439d@news.astraweb.com>
Date Wed, 20 Feb 2013 22:16:35 +1100
Subject Re: Data Tree urgent help!!!!!!
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2105.1361359003.2939.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361359003 news.xs4all.nl 6987 [2001:888:2000:d::a6]:57437
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39346

Show key headers only | View raw


On Wed, Feb 20, 2013 at 10:01 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> Leo Breebaart wrote:
>
>> 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.
>
> I'm wondering why you used map.
>
>
> apple, pear, dog, cat, fork, spoon = "apple pear dog cat fork spoon".split()

Why, in case someone monkeypatched split() to return something other
than strings, of course!

Sorry, I've been learning Ruby this week, and I fear it may be
damaging to my mind...

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Data Tree urgent help!!!!!! anadionisio257@gmail.com - 2013-02-19 04:14 -0800
  Re: Data Tree urgent help!!!!!! Peter Otten <__peter__@web.de> - 2013-02-19 13:34 +0100
    Re: Data Tree urgent help!!!!!! Ana Dionísio <anadionisio257@gmail.com> - 2013-02-19 04:50 -0800
    Re: Data Tree urgent help!!!!!! Ana Dionísio <anadionisio257@gmail.com> - 2013-02-19 04:50 -0800
    Re: Data Tree urgent help!!!!!! Leo Breebaart <leo@lspace.org> - 2013-02-20 10:18 +0000
      Re: Data Tree urgent help!!!!!! Peter Otten <__peter__@web.de> - 2013-02-20 11:46 +0100
      Re: Data Tree urgent help!!!!!! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-20 22:01 +1100
        Re: Data Tree urgent help!!!!!! Chris Angelico <rosuav@gmail.com> - 2013-02-20 22:16 +1100
          Re: Data Tree urgent help!!!!!! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-20 22:47 +1100

csiph-web