[C++-sig] Pyplusplus: operators <</>> not supported?
Hans Meine
meine at informatik.uni-hamburg.de
Wed Jun 4 11:41:38 CEST 2008
Am Dienstag, 03. Juni 2008 19:43:37 schrieb Roman Yakovenko:
> I think there is small confusion, but it doesn't change the facts.
> Py++ doesn't support operators << and >>
> which write to some stream.
>
> I did not know that it is possible to define shift operators for
> classes. Can you point me to the relevant documentation?
For Python or C++? Sorry if I state something obvious, but I am not sure what
you're asking about, so here is both:
In Python, it's __[i][l/r]shift__, in C++ it's simply a matter of defining
operator<</>>/<<=/>>= like all other operators. Given your C++ skills, you
probably meant the former, for which the docs are at
http://docs.python.org/ref/numeric-types.html
--
Ciao, / /
/--/
/ / ANS
More information about the Cplusplus-sig
mailing list