[Python-Dev] once [was: Simple Switch statementZ]

Christos Georgiou tzot at mediconsa.com
Thu Jun 29 15:57:10 CEST 2006


I haven't followed the complete discussion about once, but I would assume it 
would be used as such:

once <name> = <expression>

that is, always an assignment, with the value stored as a cellvar, perhaps, 
on first execution 0f the code.

Typically I would use it as:

def function(a):
    once pathjoin = os.path.join
    <etc>




More information about the Python-Dev mailing list