Re: [master 5/6] iutil: execWithCallback() and execWithPulseProgress() return an object.

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

 



On 05/20/2010 10:58 PM, Brian C. Lane wrote:
I would probably just use a dict for something like this. To me classes
are for data structures and the methods that act on them, not just an
easy container for data -- that's what dicts are for. But that is likely
a personal preference :)

I am going to use objects, simply because accessing object.parameter 
looks (to me) more aesthetic than object["parameter"]. Plus I know 
returning an object here will always be sufficient whatever we decide to 
do with it in the future. The only thing a dictionary could offer over 
an object is that it's easier to iterate over its keys/values or test 
for their presence. But in this case we know all the 'keys' in advance.
Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux