[Yum] some refactoring...

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

 



		Hi, seth!

>>>>> "sv" == seth vidal <skvidal@xxxxxxxxxxxx> 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.


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux