Norbert Nemec wrote: > Hmm - let me think.... We already have > rc > rcParams > rc_params > rcdefaults > rcParamDefaults > defaultParams > in the main module of maplotlib > > How about calling the new module 'rcdefaultparams.py', simply to make > the confusion complete and because I really feel that no other name > would fit the current "naming scheme" better... ;-)
Yes, it is confusing, there are too many similar names. I suspect some are used infrequently enough that we could change them without too much pain. But the new module is really two things: 1) rc utilities (mainly validation facilities) and 2) a set of default values. If these are kept together the module could be called "rc_init.py" because everything is mainly used for rc initialization, although there are things still in mpl's __init__.py that are also part of the rc initialization. Or it could be called "rc_utils.py" or "rcsetup.py". I would prefer any of these to rcdefaultparams.py. Furthermore, even after factoring out the rc things as you have done the mpl namespace is badly cluttered with things like checkdep_dvipng, (which is actually part of the rc validation, so maybe it should be in your new module) so still more refactoring and/or renaming might be in order. I can imagine a class being used to good effect to organize the whole business of rc handling. One more miscellaneous thought: shouldn't mpl.rc() be using the validation functions instead of simply stuffing inputs into rcParams? I suppose this brings us back to the old "traits, properties, or neither" question. But incremental improvements such as the one you have made are still helpful. Eric > > Greetings, > Norbert > > > > John Hunter wrote: >> On 6/30/07, Norbert Nemec <[EMAIL PROTECTED]> wrote: >> >>> Hi there, >>> >>> I just checked in some major reorganization work in __init__.py >>> >>> The main intention was to move the list of option defaults to a separate >>> file 'rcdefaults.py' that could be imported from setup.py to access the >>> settings with minimal dependencies on the remaining code. >>> >> I haven't tested this but I did take a brief look at it and I think >> your cleaning and organizing is useful. I think we have a naming >> problem though -- this __init__ module defines an rcdefaults function, >> which is likely to cause confusion with the new rcdefaults module. >> Eg, >> >> >from matplotlib import rcdefaults >> >> will be ambiguous. You may want to consider a new name. >> >> DH >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlib-devel mailing list >> Matplotlib-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel