List Info

Thread: Small patch for portage_dep.strip_empty




Small patch for portage_dep.strip_empty
country flaguser name
Germany
2008-03-12 13:46:35
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi guys,

while looking through portage code, I saw, that
portage_dep.strip_empty
also modifies the passed list _in place_:

|>> l = [0,1,2,3,4]
|>> strip_empty(l)
[1, 2, 3, 4]
|>> l
[1, 2, 3, 4]

I don't know if this is wanted behavior - but as it is not
documented, I
doubt it 

Thus - a small patch: And now using filter for this task
. I
hope
nothing relies on the side-effect desribed above.

Regards,
Necoro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFH2CUK4UOg/zhYFuARAp+PAJ9sLQ/M7OQGTLZN8RBaOwEdvKZ9tACe
Iq51
DqAXNQHuM9CqoFaR14EiRyQ=
=Nb2a
-----END PGP SIGNATURE-----

  
Re: Small patch for portage_dep.strip_empty
country flaguser name
United States
2008-03-13 13:08:49
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

René 'Necoro' Neumann wrote:
> Hi guys,
> 
> while looking through portage code, I saw, that
portage_dep.strip_empty
> also modifies the passed list _in place_:
> 
> |>> l = [0,1,2,3,4]
> |>> strip_empty(l)
> [1, 2, 3, 4]
> |>> l
> [1, 2, 3, 4]
> 
> I don't know if this is wanted behavior - but as it is
not documented, I
> doubt it 
> 
> Thus - a small patch: And now using filter for this
task .
I hope
> nothing relies on the side-effect desribed above.
> 
> Regards,
> Necoro

Thanks, I've taken your suggestion and it's fixed in svn.

Zac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFH2W2v/ejvha5XGaMRAm9FAJ9DTLEGwz2o+FxskTUUcdkUtZKmJACe
Pu1N
bHsGlZuazfTI1MHZwVi3FZQ=
=DaZt
-----END PGP SIGNATURE-----
-- 
gentoo-portage-devlists.gentoo.org mailing list


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )