On Sun, Aug 22, 2010 at 4:46 PM, j.c.sackett
<email address hidden> wrote:
> === modified file 'lib/lp/registry/model/person.py'
> --- lib/lp/registry/model/person.py 2010-08-22 03:09:51 +0000
> +++ lib/lp/registry/model/person.py 2010-08-22 04:16:05 +0000
> @@ -2203,6 +2203,10 @@
> # Get all of the teams this person participates in.
> teams = list(self.teams_participated_in)
>
> + # For cases where self is a team, we don't need self as a team
> + # participated in.
> + teams = [team for team in teams if team != self]
This is not idiomatic python. Does the following work?
teams = [team for team in teams if team is not self]
It may not due to security proxies; worth a comment if it doesn't to
avoid cleanups taking someones time.
On Sun, Aug 22, 2010 at 4:46 PM, j.c.sackett registry/ model/person. py' registry/ model/person. py 2010-08-22 03:09:51 +0000 registry/ model/person. py 2010-08-22 04:16:05 +0000 teams_participa ted_in)
<email address hidden> wrote:
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -2203,6 +2203,10 @@
> # Get all of the teams this person participates in.
> teams = list(self.
>
> + # For cases where self is a team, we don't need self as a team
> + # participated in.
> + teams = [team for team in teams if team != self]
This is not idiomatic python. Does the following work?
teams = [team for team in teams if team is not self]
It may not due to security proxies; worth a comment if it doesn't to
avoid cleanups taking someones time.
-Rob