Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Small patch for portage_dep.strip_empty
Date: Thu, 13 Mar 2008 18:08:28
Message-Id: 47D96DB1.6090602@gentoo.org
In Reply to: [gentoo-portage-dev] Small patch for portage_dep.strip_empty by "René 'Necoro' Neumann"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 René 'Necoro' Neumann wrote:
5 > Hi guys,
6 >
7 > while looking through portage code, I saw, that portage_dep.strip_empty
8 > also modifies the passed list _in place_:
9 >
10 > |>> l = [0,1,2,3,4]
11 > |>> strip_empty(l)
12 > [1, 2, 3, 4]
13 > |>> l
14 > [1, 2, 3, 4]
15 >
16 > I don't know if this is wanted behavior - but as it is not documented, I
17 > doubt it :)
18 >
19 > Thus - a small patch: And now using filter for this task :). I hope
20 > nothing relies on the side-effect desribed above.
21 >
22 > Regards,
23 > Necoro
24
25 Thanks, I've taken your suggestion and it's fixed in svn.
26
27 Zac
28 -----BEGIN PGP SIGNATURE-----
29 Version: GnuPG v2.0.7 (GNU/Linux)
30
31 iD8DBQFH2W2v/ejvha5XGaMRAm9FAJ9DTLEGwz2o+FxskTUUcdkUtZKmJACePu1N
32 bHsGlZuazfTI1MHZwVi3FZQ=
33 =DaZt
34 -----END PGP SIGNATURE-----
35 --
36 gentoo-portage-dev@l.g.o mailing list