[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Heller
Thomas Heller added the comment: Set to accepted. As pointed out in private email, please apply it to the trunk. Your thoughts about the 'length' of pointers make sense, and are very similar to what I had in mind when I implemented pointer indexing. For indexing pointers, negative indices (in

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Heller
Changes by Thomas Heller: -- assignee: theller - twouters _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1617699 _ ___ Python-bugs-list mailing list

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Wouters
Thomas Wouters added the comment: Well, that's not quite how I implemented the slicing, and it's also not how the existing simple-slicing was implemented: A negative start index is taken to mean 0, and a stop index below the start index is taken to mean 'the start index' (leading to an empty

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Heller
Thomas Heller added the comment: Yes. But looking at your examples I think it would be better to forbid missing indices completely instead of allowing them only where they clearly mean 0. Writing (and reading!) a 0 is faster than thinking about if a missing index is allowed or what it means.

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Wouters
Thomas Wouters added the comment: Hmmm Well, that's fine by me, but it changes current behaviour, and in a way that ctypes own testsuite was testing, even ;) (it does, e.g., 'p[:4]' in a couple of places.) Requiring the start always would possibly break a lot of code. We could make only the

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Wouters
Thomas Wouters added the comment: Checked in a slightly newer version. -- resolution: accepted - fixed status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1617699 _

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-29 Thread Thomas Wouters
Thomas Wouters added the comment: Added tests (by duplicating any slicing operations in the test suite with extended slice syntax, to force the use of slice-objects ;) _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1617699

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-29 Thread Thomas Wouters
Changes by Thomas Wouters: _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1617699 _ ___ Python-bugs-list mailing list Unsubscribe:

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-29 Thread Thomas Wouters
Changes by Thomas Wouters: _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1617699 _ ___ Python-bugs-list mailing list Unsubscribe:

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: I'd like to check this into the trunk, without the non-step-1 support for now, so that we can remove simple slicing from the py3k branch. We can always add non-step-1 support later (all the sooner if someone who isn't me volunteers to do the painful bits of that