[C++-sig] Re: New slice implementation

David Abrahams dave at boost-consulting.com
Tue Jan 13 16:27:49 CET 2004


Jonathan Brandmeyer <jbrandmeyer at earthlink.net> writes:

> On Fri, 2004-01-09 at 22:12, David Abrahams wrote:
>> Raoul Gough <RaoulGough at yahoo.co.uk> writes:
>> 
>> >> Can you give me a complete example where you need this extra
>> >> constructor?  Maybe then I'll know how to answer you better.
>> >
>> > Sorry - my mistake! I missed the following in your code (at the end of
>> > the slice class):
>> >
>> >     // This declaration, in conjunction with the specialization of
>> >     // object_manager_traits<> below, allows C++ functions accepting
>> >     // slice arguments to be called from from Python.  These
>> >     // constructors should never be used in client code.
>> >     BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(slice, object)
>> >
>> > I thought I'd seen all of the constructors, but missed this one, and
>> > searching for PySliceObject didn't find anything of course. Thanks for
>> > clarifying this for me.
>> >
>> > [snip]
>> >> So how do you define the point to perform the insertion?  If the user
>> >> asks to replace every element that is greater than or equal to the
>> >> fourth and less than the first element, where do you place the new
>> >> sequence?
>> >
>> > Well, that's an interesting question when you put it like that,
>> > independant of implementation issues. In practice, I guess it's just
>> > natural that it should go at the starting index, since you would have
>> > initialized some kind of variable to this before determining that
>> > you're already outside the range of the slice. I know that's how my
>> > code works.
>> 
>> You guys'll be sure to let me know if/when you come to some consensus
>> about this stuff, right?
>
> If Mr. Gough doesn't have anything else, I think we've come to an
> agreement.
>
> For the documentation format, do you use some kind of semiautomatic
> system?  

Sadly, no.  Maybe the next time around it'll be RestructuredText.
You should feel free to use ReST for your docs, though.
libs/python/todo.txt and libs/python/todo.html are done that way.
Use a .rst extension for the ReST file, though, if you do that.

> If not, do you mind if I use a WYSIWYG system such as the html
> editor in Mozilla?  To be honest, I don't know much about html code.

No, I don't mind, as long as the editor doesn't cruft up the HTML with
a lot of cr*pola.  The output should have "logical coherence", e.g. no
fixed positions and sizes for things that should be relative, etc.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list