Re: [PATCH 2/4] flags.py: add new BootArgs() object for dealing with boot args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-02-07 at 16:53 -0800, Brian C. Lane wrote:
> On Tue, Feb 07, 2012 at 06:02:38PM -0500, Will Woods wrote:
> > This replaces Flags.cmdline (and Flags.createCmdlineDict()) with a new
> > BootArgs class.
> > 
> > BootArgs' parsing is slightly cleaner and it reads from other data
> > locations (/run/initramfs/etc/cmdline for example).
> > 
> > It's a subclass of OrderedDict, so things specified later
> > on the boot commandline can override things near the start.
> > ---
> 
> Cosmetic stuff that bugs me :)
> 
> 1. docstrings should be """ not '''

I don't really care either way, I'm just used to typing '''. 
(no shift key! it's quicker! saves me valuable milliseconds per day!!)

> 2. multiline docstrings should end with """ on a line by itself

Yeah, I actually did that correctly in patch 4, just forgot to go back
and reformat my lazy-comments in this one.

> 3. single line if's should still have the execution block on the next
> line. eg.

Hrm. I mentally have a special case for early exit/skip conditions in a
loop:

for item in some_big_damn_sequence:
    if item in skiplist: continue
    if item == SENTINEL_VALUE: break

    if item in bouncing:
        if check_bouncing_type(item) == 3:
            # handle bouncing of the third type
        else
            # general bouncing
    if item in rolling:
        # etc.

It keeps them visually separate from the "if ..." clauses that involve
actual work. 

But I agree that some of the one-line if: statements in here are kind of
gratuitous, so I'll clean that up a little.

-w

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux