FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

LinkBack Thread Tools
Old 02-08-2012, 03:55 PM
Will Woods
Default flags.py: add new BootArgs() object for dealing with boot args

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

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
# 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.


Anaconda-devel-list mailing list

Thread Tools

All times are GMT. The time now is 01:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org