-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/28/2014 05:01 PM, Guy Streeter wrote:
I'm making an effort to understand how all of tuna works (this
is
admirable, not folly, correct?). There's a part of the reload() function
in the cpus class that I don't understand. to start with:
for socket in sockets_to_sort: self.sockets[socket].sort()
Here self.sockets[socket] is a list of cpu objects. The cpu class is not
an orderable type. It does not provide it's own comparison function, and
cannot be converted to an integer value. What is the (intended) result of
calling the list's sort() function?
Another thing: these lines are indented so as to be included in the
outer loop. It seems these lines need only to be run after the other loop
is complete.
I think I must be missing something, since the code seems to work.
Although, I can't find any place that depends on self.sockets[socket]
being sorted in any meaningful way.
thanks, --Guy
I realize this isn't of high importance, but it's bugging me that I don't
understand this bit of code. Does anyone have any insight?
thanks,
- --Guy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlRRNjMACgkQ0Bme0QyNhPQbSQCfYoczMe1PRUMwx5ooE/2zExop
4WIAniMUWquKS1iaRZdFgP52tELqcC9x
=0kph
-----END PGP SIGNATURE-----