On 2/26/07, Mark Bakker <[EMAIL PROTECTED]> wrote: > ax = gca() > if len(args)==0: > aspect = ax.get_aspect() > elif len(args)==1: > aspect = args[0] > adjustable = popd(kwargs,'adjustable','box') > anchor = popd(kwargs,'anchor','C') > fixlim = popd(kwargs,'fixlim',True)
Whenever you are mutating a kwargs dictionary, eg with popd, you should first copy it. The user may be creating, saving, and resuing a kwarg dict myaspectprops = dict(adjustable='box', anchor='NW') # some code aspect(**myaspectprops) # some more code aspect(**myaspectprops) This will fail if you pop off of the kwargs in the aspect function w/o first copying it. So always do kwargs = kwargs.copy() before calling popd and friends. This is covered in the "CODING_GUIDE" document in the svn repository. JDH ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users