[C++-sig] convertibility and "Pythonicity"
Niki Spahiev
niki at vintech.bg
Sat Sep 7 09:25:19 CEST 2002
David Abrahams wrote:
> [Is "Pythonicity" the right word?]
>
> I'm interested in getting some qualitative feedback about something I'm
> doing in Boost.Python. The questions are,
> 1. How well does this behavior match up with what Python users have
> probably come to expect?
> 2. (related, I hope!) How close is it to the intended design of Python?
>
about __int__, __float__, __str__
IMHO __str__ is for 'print'. Any object has some to_string conversion,
while __int__ and __float__ are for numbers only.
HTH
Niki Spahiev
More information about the Cplusplus-sig
mailing list