Bytecode optimisation

Greg Ewing greg.ewing at compaq.com
Mon May 31 23:45:29 EDT 1999


Michael Vanier wrote:
> 
>     def munge(a, b):
>             declare a, b, return: int  # a, b, and return value are ints
>             return 2 * a + 3 * (a - b)

A small suggestion on syntax:

  def munge(a as int, b as int) as int:
    return 2 * a + 3 * (a - b)

Greg




More information about the Python-list mailing list