Gentoo Archives: gentoo-portage-dev

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@×××××.com>
To: Gentoo Portage Development <gentoo-portage-dev@l.g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] emerge --info: Modernize output of configuration of repositories
Date: Tue, 09 Dec 2014 10:17:38
Message-Id: 201412091117.17439.Arfrever.FTA@gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] emerge --info: Modernize output of configuration of repositories by Alexander Berntsen
1 2014-12-09 09:50 Alexander Berntsen napisał(a):
2 > On 08/12/14 20:04, Arfrever Frehtes Taifersar Arahesis wrote:
3 > > + for skipped_var in skipped_vars: + try: +
4 > > myvars.remove(skipped_var) + except ValueError: + pass +
5 > wat
6
7 It is deleting elements from a list.
8
9 >>> mylist = ["ab", "cd", "ef"]
10 >>> mylist
11 ['ab', 'cd', 'ef']
12 >>> mylist.remove("cd")
13 >>> mylist
14 ['ab', 'ef']
15 >>> mylist.remove("cd")
16 Traceback (most recent call last):
17 File "<stdin>", line 1, in <module>
18 ValueError: list.remove(x): x not in list
19 >>>
20
21 --
22 Arfrever Frehtes Taifersar Arahesis

Attachments

File name MIME type
signature.asc application/pgp-signature