[Yum] some refactoring...

Vladimir Bormotov bor at vb.dn.ua
Wed Oct 30 13:00:06 UTC 2002


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



More information about the Yum mailing list