while true: !!!

Rainer Deyke root at rainerdeyke.com
Tue Dec 19 13:24:15 EST 2000


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:91o3l501i59 at news2.newsguy.com...
> "Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote in message
> news:slrn93st0m.6c1.qrczak at qrnik.zagroda...
> > OTOH Python does not equate characters with integers. C, C++ and Java
> > do.
>
> Wrong!  C's types are always slightly fuzzy, but that does
> NOT apply to C++ or Java; e.g., in C++:
>
> void f(int) {
>     cout << 'integer\n';
> }
>
> void f(char) {
>     cout << 'character\n';
> }

'char' is an integer type, same as 'short' and 'long'.  'int' is just
another integer type.  It is possible (and often desirable) to use 'char's
(or 'unsigned char's) to hold small numeric values.  The same does not apply
to single character strings in Python.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list