Tkinter: The good, the bad, and the ugly!
Mel
mwilson at the-wire.com
Thu Dec 30 15:26:39 EST 2010
Steven D'Aprano wrote:
> On Thu, 30 Dec 2010 07:24:04 -0800, rantingrick wrote:
>
>> Also one could argue that C and Python are very similar.
>
> One could also argue that black is white, that diamond is softer than
> chalk, and that bananas are a type of spaceship. Doesn't make it so.
>
> How to add two numbers in C:
>
> #include <stdio.h>
> int main()
> {
> int a, b;
> scanf("%d%d", &a, &b);
> printf("%d\n", a + b);
> return 0;
> }
>
> And in Python:
>
> a, b = input().split() # use raw_input in Python 2
> print(int(a) + int(b))
>
>
> And in Tcl:
>
> scan [gets stdin] "%d %d" x y
> puts [expr {$x + $y}]
>
>
> None of the three are exactly clones of each other, but it seems to me
> that Tcl and Python are quite close in spirit, if not syntax.
They both have the interpreter spirit. Very different under the hood; Tcl
is the LISP of strings. They could have called it STRP.
Mel.
More information about the Python-list
mailing list