[Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

Pierre GM pgmdevlist@gmail....
Mon Jul 16 15:01:42 CDT 2012


Well, as `skip_header` is a number of lines, I don't really see anything particular magical about a `skip_header=-1`. Plus, range(-1) == [], while range("comments") raises a TypeError. And then you'd have to figure why the exception was raised.

-- 
Pierre GM


On Monday, July 16, 2012 at 21:56 , Nathaniel Smith wrote:

> On Mon, Jul 16, 2012 at 8:06 PM, Paul Natsuo Kishimoto
> <mail@paul.kishimoto.name (mailto:mail@paul.kishimoto.name)> wrote:
> > I've implemented this feature with skip_header=-1 as suggested by
> > Pierre, and in doing so removed the regression. TravisBot seems to like
> > it: https://github.com/numpy/numpy/pull/351
> > 
> 
> 
> Can we please not use weird magic values like this? This isn't C.
> skip_header="comments" would work just as well and be far more
> self-explanatory...
> 
> -n
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org (mailto:NumPy-Discussion@scipy.org)
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120716/557f8b7c/attachment.html 


More information about the NumPy-Discussion mailing list