[issue6786] readline and zero based indexing

2011-07-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I'd be writing a patch which would allow a programmer the option to explicitly use/instantiate the library in a zero-based way. [...] Would this be reasonable? I think not. Mark already stated his opposition to “a crazy level of micro

[issue6786] readline and zero based indexing

2010-08-09 Thread James
James purplei...@gmail.com added the comment: I'd be writing a patch which would allow a programmer the option to explicitly use/instantiate the library in a zero-based way. This way throughout their particular program, the indexing of elements could be consistent. Not having this causes you

[issue6786] readline and zero based indexing

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I do not see a change as being accepted. It would not add any new function but probably break code, if not habits, for the sake of consistency that would have been nice. -- resolution: - rejected status: open - closed versions:

[issue6786] readline and zero based indexing

2010-08-04 Thread James
James purplei...@gmail.com added the comment: It's an incompatible change; it would definitely break my code, however I think it should be wishlisted for an API-break release like 3.5 or 4.0 or something like that. IMHO, the bindings should be pythonic, even if the underlying library isn't.

[issue6786] readline and zero based indexing

2010-08-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: A patch would be useful: I don't think this issue is going to go anywhere without one. One of the reasons I'm reluctant to mess with the readline module more than necessary is that it's historically been fairly fragile: it has to work not

[issue6786] readline and zero based indexing

2010-08-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Postscript: I'm also opposed to the idea of 'optional' zero-based indexing. This just seems like a crazy level of micro control to me. Better to have just the one way way to do it, even if it isn't quite pythonic. --

[issue6786] readline and zero based indexing

2010-08-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I wonder if changing the base now would cause problems. Is readline only used interactively? -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org

[issue6786] readline and zero based indexing

2010-08-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Changing to feature request: I'm fairly certain that this isn't a bug (i.e., it's working as designed). It's possible to use the readline module non-interactively, so it's probably a safe bet that there's at least some code out there that

[issue6786] readline and zero based indexing

2009-09-10 Thread James
James purplei...@gmail.com added the comment: @mark: thanks for the comment; i suppose we should investigate why and if c readline is 1 based... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6786

[issue6786] readline and zero based indexing

2009-09-10 Thread James
James purplei...@gmail.com added the comment: i found this: http://tiswww.case.edu/php/chet/readline/history.html search for: Variable: int history_base perhaps we can set this to 0 in the python bindings. more so, perhaps someone is using 1 because they made a mistake? --

[issue6786] readline and zero based indexing

2009-09-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'd guess the same. Most of the readline module is just a thin wrapper around the system readline library, so if the system readline library uses one-based indexing, so does the readline module. Changing this would probably be quite

[issue6786] readline and zero based indexing

2009-08-28 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Please ask questions on, for instance, the python-list (c.l.p). If you find evidence that this is actually a bug, please supply. Else, close (or change to doc issue -- see below). My *guess* is that history lists are 1-based and Python

[issue6786] readline and zero based indexing

2009-08-26 Thread James
New submission from James purplei...@gmail.com: why is it that the zeroth readline history item is seemingly always none. I would expect this to support zero-based indexing in python, but perhaps I have missed some detail in readline somewhere. Cheers, _J ja...@work:~$ python Python 2.5.2