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

Jonathan Brandmeyer jbrandmeyer at earthlink.net
Tue Jan 13 06:09:33 CET 2004


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?  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.

Thanks,
Jonathan Brandmeyer





More information about the Cplusplus-sig mailing list