All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Lock <josh@linux.intel.com>
To: Oren Leaffer <oren@ephemeron-labs.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/3] Hob: implement a self-defined notebook visual component for Hob
Date: Tue, 13 Mar 2012 12:23:51 -0700	[thread overview]
Message-ID: <4F5F9EC7.3040006@linux.intel.com> (raw)
In-Reply-To: <CALvD2LhvZB_ESbLp9s6Xa0w0WcEJWUG4v1gkh5sSYbfKBYBGEA@mail.gmail.com>



On 13/03/12 12:08, Oren Leaffer wrote:
>> 1) We're doing the range dance rather than just doing the Pythonic thing and
>> iterating over the sequence with "for x in y".
>> http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#use-in-where-possible-1
>>
>> I understand its desirable to have the index in some places, but where it
>> isn't we should use the standard pattern. This is good coding practice.
>
> I think I pointed it out before, but it was on a Friday, so I might as
> well repeat -
>
> If you need the index you can replace something like this:
>    for i in range(len(self.children)): # ugly
> With:
>    for i,child in enumerate(self.children): # less ugly!

Indeed, I'd be happy to see more of that.

Thanks for pointing that out Oren!

Cheers,
Joshua
-- 
Joshua '贾詡' Lock
         Yocto Project "Johannes factotum"
         Intel Open Source Technology Centre



  reply	other threads:[~2012-03-13 19:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 13:23 [PATCH 0/3][V2] Hob Notebook Implementation Shane Wang
2012-03-12 13:23 ` [PATCH 1/3] Hob: implement a self-defined notebook visual component for Hob Shane Wang
2012-03-13 18:08   ` Joshua Lock
2012-03-13 19:08     ` Oren Leaffer
2012-03-13 19:23       ` Joshua Lock [this message]
2012-03-12 13:23 ` [PATCH 2/3] Hob: use HobNotebook to implement a notebook in build details page Shane Wang
2012-03-13 18:09   ` Joshua Lock
2012-03-12 13:23 ` [PATCH 3/3] Hob: show indicators on the tabs of the Hob notebook Shane Wang
2012-03-13 18:12   ` Joshua Lock
2012-03-13 18:10 ` [PATCH 0/3][V2] Hob Notebook Implementation Joshua Lock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F5F9EC7.3040006@linux.intel.com \
    --to=josh@linux.intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=oren@ephemeron-labs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.