optimamodel / optima

Optima HIV software tool
http://optimamodel.com
GNU Lesser General Public License v3.0
7 stars 1 forks source link

Improve odict repr #1622

Closed gchadder3 closed 7 years ago

gchadder3 commented 7 years ago

Hierarchical display of odicts is much improved. To test:

import optima as op P = op.demo(0) toydict = op.odict() toydict['author'] = 'George Chadderdon' toydict['title'] = 'Emancipation' toydict['copyright'] = 2017 toydict['publisher'] = 'Who Knows Publications' toydict2 = op.odict() toydict2['minime'] = toydict toydict2['author'] = 'George Chadderdon' toydict2['title'] = 'Emancipation' toydict2['copyright'] = 2017 toydict2['publisher'] = 'Who Knows Publications' toydict3 = op.odict() toydict3['minime'] = toydict2 toydict3['author'] = 'George Chadderdon' toydict3['title'] = 'Emancipation' toydict3['copyright'] = 2017 toydict3['publisher'] = 'Who Knows Publications'

Try and verify good output for: toydict3 P.parsets P.data

gchadder3 commented 7 years ago

I updated the code in repr() so that the dict was only traversed once rather than twice to pull out the value strings.

cliffckerr commented 7 years ago

@gchadder3 looks great, thank you!