pre-PEP: Suite-Based Keywords

Brian Sabbey sabbey at u.washington.edu
Sun Apr 17 18:17:09 EDT 2005


Brian Sabbey wrote:
> Does anyone know if the 'where' keyword is only for readability (or does it 
> disambiguate the syntax in some situations)?  I think I prefer leaving it 
> off.

To answer my own question, I see by reading the where threads that using 
the 'where' keyword allows things such as:

# Design by contract (from Nick Coghlan)
@dbc(pre, post)
def foo():
    pass
with:
    def pre():
      pass
    def post():
      pass



More information about the Python-list mailing list