|
From: Michael F. <fuz...@vo...> - 2009-10-17 17:43:22
|
Jeremy Gray wrote: >> Thanks for tracking this down - however I don't think that it is a bug. >> If the only values in a missing section have defaults then there are no >> missing values >> > > yes, makes sense. but.... > > >> and nothing to report. >> > > it seems to me that there is something that validate could usefully > report (and I guess I was expecting it to): if all values in a section > are being reverted to the defaults, Allowing ConfigObj to provide them when the user doesn't is the only purpose of default values... > then there is at least the > possibility that they have been changed right under the user's nose. > Only if they didn't supply them (i.e. nothing has 'changed'). > so it would be nice for validate to convey this to the outside world > somehow, eg by reporting 'True' 'Default' rather than just True? It > seems like returning 'True' is overly silent about this situation. > You can always use 'config.defaults' for a list of all entries filled from default values. All the best, Michael Foord > eventually I'll be structuring things so that my users cannot edit the > config file directly, avoiding this situation. > > >> In order to fill in the default >> ConfigObj *has* to create the section so it is no longer missing. >> > > that makes sense. > > thanks again, > > --Jeremy > > > >> It would also make things harder for error handling code - if you have >> to handle a missing section then you would no longer know if the section >> is actually present in the resulting ConfigObj instance or not... >> >> All the best, >> >> Michael Foord >> >>> --Jeremy >>> >>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >>> http://p.sf.net/sfu/devconference >>> _______________________________________________ >>> Configobj-develop mailing list >>> Con...@li... >>> https://lists.sourceforge.net/lists/listinfo/configobj-develop >>> >>> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> >> > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog |