Re: [matplotlib-devel] modifying TConfig

2007-12-14 Thread Christopher Barker
Gael Varoquaux wrote: > Guys, I agree with all this. It's not about the theory, but about the > user experience. The user just types along, and doesn't read books and > manuals. A least the average user. And we want to make it as easy as > possible for her. Yes, we all like that. Which is why it

Re: [matplotlib-devel] modifying TConfig

2007-12-14 Thread Christopher Barker
Fernando Perez wrote: > For a while I've toyed with the idea of adding an option to ipython so > the output prompts could use str() instead of repr(), so users who > *deliberately* want to switch, aware of the potential conflicts, do > so. +1 -Chris -- Christopher Barker, Ph.D. Oceanographer

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Gael Varoquaux
On Thu, Dec 13, 2007 at 03:14:23PM -0800, Christopher Barker wrote: > I'm not up on the details of this specific issue, but in general, the > idea that: > __repr__ is precise and complete > __str__ is pretty and readable > is a good one. Guys, I agree with all this. It's not about the theory, b

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Fernando Perez
On Dec 13, 2007 4:14 PM, Christopher Barker <[EMAIL PROTECTED]> wrote: > I'm not up on the details of this specific issue, but in general, the > idea that: > > __repr__ is precise and complete > __str__ is pretty and readable > > is a good one +1 For a while I've toyed with the idea of adding an

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Christopher Barker
Gael Varoquaux wrote: >> x == eval(repr(x)) > >> That is true for many of the builtin data types of the language. And the really the whole point of having __repr__, in addition to __str__ > I totally agree. However if a user types: > pylab.rcParams > in IPython, or the Python interpreter, she ge

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Darren Dale
On Thursday 13 December 2007 10:05:22 am Gael Varoquaux wrote: > On Thu, Dec 13, 2007 at 09:31:03AM -0500, Darren Dale wrote: > > It is possible to save the current settings to a file, so only those that > > deviate from the default are written to the file. By putting the comments > > on the same l

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Gael Varoquaux
On Thu, Dec 13, 2007 at 09:31:03AM -0500, Darren Dale wrote: > It is possible to save the current settings to a file, so only those that > deviate from the default are written to the file. By putting the comments on > the same line as the data, you encourage users to comment their config files >

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Darren Dale
On Thursday 13 December 2007 04:24:21 am Gael Varoquaux wrote: > On Thu, Dec 13, 2007 at 09:30:44AM +0100, Gael Varoquaux wrote: > > On Wed, Dec 12, 2007 at 06:39:02PM -0700, Fernando Perez wrote: > > > On second thought though: __str__ is the one meant for 'human > > > consumption', while __repr__

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Gael Varoquaux
On Wed, Dec 12, 2007 at 06:39:02PM -0700, Fernando Perez wrote: > On second thought though: __str__ is the one meant for 'human > consumption', while __repr__ is deliberately meant to be much more > machine-like. Basically the idea is that, whenever possible, one can > do > x == eval(repr(x)) > T

Re: [matplotlib-devel] modifying TConfig

2007-12-13 Thread Gael Varoquaux
On Thu, Dec 13, 2007 at 09:30:44AM +0100, Gael Varoquaux wrote: > On Wed, Dec 12, 2007 at 06:39:02PM -0700, Fernando Perez wrote: > > On second thought though: __str__ is the one meant for 'human > > consumption', while __repr__ is deliberately meant to be much more > > machine-like. Basically the

Re: [matplotlib-devel] modifying TConfig

2007-12-12 Thread Fernando Perez
On Dec 12, 2007 5:58 PM, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > Hi, > > I definetely don't like the fact that .__repr__() and repr() are used all > over TConfig for eg storing to file. > > First of all I would like to modify __repr__ for a TConfig class to give > a more synthetic view. > > I p

Re: [matplotlib-devel] modifying TConfig

2007-12-12 Thread Fernando Perez
On Dec 12, 2007 6:34 PM, Darren Dale <[EMAIL PROTECTED]> wrote: > > On Wednesday 12 December 2007 7:58:10 pm Gael Varoquaux wrote: > > Hi, > > > > I definetely don't like the fact that .__repr__() and repr() are used all > > over TConfig for eg storing to file. > > > > First of all I would like to

Re: [matplotlib-devel] modifying TConfig

2007-12-12 Thread Darren Dale
On Wednesday 12 December 2007 7:58:10 pm Gael Varoquaux wrote: > Hi, > > I definetely don't like the fact that .__repr__() and repr() are used all > over TConfig for eg storing to file. > > First of all I would like to modify __repr__ for a TConfig class to give > a more synthetic view. > > I propo