Cesare> At this time with Python 2.6.1 we have these results:
    Cesare> def f(): return 1 + 2 * 3 + 4j
    ...
    Cesare> def f(): return ['a', ('b', 'c')] * (1 + 2 * 3)

Guido can certainly correct me if I'm wrong, but I believe the main point of
his message was that you aren't going to encounter a lot of code in Python
which is amenable to traditional constant folding.  For the most part, they
will be assigned to symbolic "constants", which, unlike C preprocessor
macros aren't really constants at all.  Consequently, the opportunity for
constant folding is minimal and probably introduces more opportunities for
bugs than performance improvements.

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to