Gentoo Archives: gentoo-portage-dev

From: "W. Trevor King" <wking@×××××××.us>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH v2 1/3] pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries
Date: Sun, 19 Jan 2014 22:51:53
Message-Id: 20140119225148.GU29063@odin.tremily.us
In Reply to: Re: [gentoo-portage-dev] [PATCH v2 1/3] pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries by Alec Warner
1 On Sun, Jan 19, 2014 at 02:45:24PM -0800, Alec Warner wrote:
2 > On Sun, Jan 19, 2014 at 2:44 PM, Alec Warner <antarus@g.o> wrote:
3 > > This function and the next function you wrote are identical. How
4 > > about making a single function?
5 > >
6 > > …
7 > >
8 > > def getIntValueFromSettings(settings, key, default):
9 > > …
10 >
11 > Note, don't actually use these function names, they are terrible.
12
13 A good name would be getint [1]. If we used ConfigParser, we wouldn't
14 have to write any Portage-specific code at all ;). I don't think
15 there's a shortage of things that could be streamlined here, and was
16 trying to minimize rewriting until fetch() had been reduced to
17 something I can comprehend ;).
18
19 Cheers,
20 Trevor
21
22 [1]: http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.getint
23
24 --
25 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
26 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

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

Replies