You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most if not all of the keys() calls in the code do not require the list form of the keys (you only need to listify the keys if you either want to use [] to access elements of the key list, or if you will alter the dict while iterating over the keys). Furthermore, a more readable way to do if vmName in self.machines.keys():
would be to implement __contains__ in the Tango*Dictionary classes themselves and then call
if vmName in self.machines:
instead. TangoRemoteDictionary could use HEXISTS to implement __contains__ and not have to fetch everything.
The text was updated successfully, but these errors were encountered:
Expected Behavior
N/A, same behavior, syntax change
Actual Behavior
N/A, same behavior, syntax change
Steps to Reproduce the Behavior
N/A, same behavior, syntax change
From this comment #160 (comment):
Most if not all of the keys() calls in the code do not require the list form of the keys (you only need to listify the keys if you either want to use [] to access elements of the key list, or if you will alter the dict while iterating over the keys). Furthermore, a more readable way to do
if vmName in self.machines.keys():
would be to implement
__contains__
in the Tango*Dictionary classes themselves and then callif vmName in self.machines:
instead. TangoRemoteDictionary could use HEXISTS to implement
__contains__
and not have to fetch everything.The text was updated successfully, but these errors were encountered: