[C++-sig] question on object section of bpl tutorial

David Abrahams dave at boost-consulting.com
Thu Dec 12 02:17:29 CET 2002

Mark Russell <mrussell8081 at pacbell.net> writes:

> Hi Dave,
> A quick question from the basic interface page of the object portion of the
> bpl tutorial.  On this page you show the following code snippet.  What types
> are x & y?  --Mark
> def f(x, y):
> 	if (y == 'foo'):
> 		x[3:7] = 'bar'
> 	else:
> 		x.items += y(3, x)
> 	return x

What types would you like them to be? This is Python, remember? <wink>

Seriously, though: I realize that it's you're unlikely to find types
in common usage for which that code makes much sense.  Clarifying
patches welcome.

                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

More information about the Cplusplus-sig mailing list