* Re: [gentoo-portage-dev] [PATCH v2 1/3] pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries
@ 2014-01-19 22:51 99% ` W. Trevor King
0 siblings, 0 replies; 1+ results
From: W. Trevor King @ 2014-01-19 22:51 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Sun, Jan 19, 2014 at 02:45:24PM -0800, Alec Warner wrote:
> On Sun, Jan 19, 2014 at 2:44 PM, Alec Warner <antarus@gentoo.org> wrote:
> > This function and the next function you wrote are identical. How
> > about making a single function?
> >
> > …
> >
> > def getIntValueFromSettings(settings, key, default):
> > …
>
> Note, don't actually use these function names, they are terrible.
A good name would be getint [1]. If we used ConfigParser, we wouldn't
have to write any Portage-specific code at all ;). I don't think
there's a shortage of things that could be streamlined here, and was
trying to minimize rewriting until fetch() had been reduced to
something I can comprehend ;).
Cheers,
Trevor
[1]: http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.getint
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-01-19 20:58 [gentoo-portage-dev] [PATCH 0/3] Initial fetch() refactoring W. Trevor King
2014-01-19 22:14 ` [gentoo-portage-dev] [PATCH v2 " W. Trevor King
2014-01-19 22:14 ` [gentoo-portage-dev] [PATCH v2 1/3] pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries W. Trevor King
2014-01-19 22:44 ` Alec Warner
2014-01-19 22:45 ` Alec Warner
2014-01-19 22:51 99% ` W. Trevor King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox