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

Pierre GM pgmdevlist at gmail.com
Mon Jul 16 16:01:42 EDT 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 at paul.kishimoto.name (mailto:mail at 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 at scipy.org (mailto:NumPy-Discussion at scipy.org)
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 
> 


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


More information about the NumPy-Discussion mailing list