New to Python: Features

Andrew Dalke adalke at mindspring.com
Thu Oct 7 20:16:04 CEST 2004


Andrea Griffini:
> Unfortunately it's something you just can't refuse to
> do in C++ because const correctness is tied to other
> parts of the language and was used to try to patch
> problems in other philosophically unrelated areas (I'm
> talking about temporaries and implicit conversions).

I recall doing things like this

    StringClass s = ....;

    /* StringClass only supports (const char *) */
    /* fctn only supports (char *) but doesn't change the string */
    /* Force it to work */
    fctn( (char *) (const char *) s );

Perhaps not a refusal, but a disdain.

				Andrew
				dalke at dalkescientific.com



More information about the Python-list mailing list