python reduce constants at run or compile?

Frank Mitchell frankm at bayarea.net
Thu Sep 7 03:27:45 EDT 2000


nemir wrote in message <8FA89F51Fnemiria at 139.130.239.94>...
>what is a tuple here?  Something that is constant, I am guessing...  ;)


A tuple is a Python datatype that contains a sequence of other datatypes.
Tuples are not modifiable after creation (although if it contains a
modifiable datatype, such as a dictionary, list, or class instance, that
*can* still be modified.)

>I thought Python wasn't compiled. Am I getting myself all mixed up?


Python scripts are compiled to bytecode when they are parsed; the
interpreter uses the bytecode, not the original text.  ".pyc" files are that
bytecode written to a file, to avoid reparsing each module.

Frank






More information about the Python-list mailing list