[Yum] some refactoring...

seth vidal skvidal at phy.duke.edu
Wed Oct 30 14:06:36 UTC 2002


On Wed, 2002-10-30 at 08:00, Vladimir Bormotov wrote:
> 
> 		Hi, seth!
> 
> >>>>> "sv" == seth vidal <skvidal at phy.duke.edu> writes:
> 
> [skip]
> 
> >>   each case modified like this:
> >>
> >> - elif cmds[0] == 'info':
> >> - cmds.remove(cmds[0])
> >> + elif _command == 'info':
> >>
> >>  I think, result very pretty ;)
> >>
> 
>  sv> I like the single pop instead of multiple cmds.remove
> 
>  ;)
>  
>  
>  sv> but I don't understand - is there a benefit from naming the variable
>  sv> _command? Is it just to imply that it should be a private variable? 
>  
>  sv> I thought _ didn't do anything but __ really made it private. Is that
>  sv> right?
> 
>  yes, right.
>  
>  Names started with _ must be undestanded as 'local varable' - it's a usual
>  python practice.
>  

ok - I was just making sure I wasn't missing something there.

I like the function redo. I'll add it to the things I want to patch in.

Thanks.
-sv





More information about the Yum mailing list