Re: [matplotlib-devel] is_scalar bug

2008-07-23 Thread John Hunter
On Wed, Jul 23, 2008 at 8:53 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > That should be an "and" not an "or" OK, I'll leave the final fix to you. JDH - This SF.Net email is sponsored by the Moblin Your Move Developer'

Re: [matplotlib-devel] is_scalar bug

2008-07-23 Thread David Kaplan
Hi, Almost: In [3]: cbook.is_scalar((0,1)) Out[3]: True That should be an "and" not an "or". Cheers, David On Wed, 2008-07-23 at 08:16 -0500, John Hunter wrote: > On Wed, Jul 23, 2008 at 4:04 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I believe that the cbook.is_scalar functio

Re: [matplotlib-devel] is_scalar bug

2008-07-23 Thread John Hunter
On Wed, Jul 23, 2008 at 4:04 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > Hi, > > I believe that the cbook.is_scalar function has a bug: > > In [19]: cbook.is_scalar('abc') > Out[19]: 1 > > I believe it should be: > > def is_scalar(obj): >'return true if *obj* is not string like and is not ite

[matplotlib-devel] is_scalar bug

2008-07-23 Thread David Kaplan
Hi, I believe that the cbook.is_scalar function has a bug: In [19]: cbook.is_scalar('abc') Out[19]: 1 I believe it should be: def is_scalar(obj): 'return true if *obj* is not string like and is not iterable' return not is_string_like(obj) and not iterable(obj) Cheers, David -- **