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 |