parse-time optimizations

Tim Peters tim.one at home.com
Wed May 30 07:42:18 CEST 2001


[Greg Ewing]
> You would have to be careful how you implemented
> this, because
>
>   x + "foo" + "blarg"
>
> could have very different results from
>
>   x + "fooblarg"
>
> depending on what sort of thing x is bound to.

Ditto
    x + 1 + 2
vs
    x + 3

and so on.  I don't want to use it at all unless it helpfully expands

    stars = "*" * 1000000

at compile-time too <wink>.

.pyc-files-are-far-too-small-ly y'rs  - tim





More information about the Python-list mailing list