Opened 4 years ago

Closed 4 years ago

#8823 closed enhancement (fixed)

Use new grammar for except clauses

Reported by: robinson Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords:
Cc: atagar Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Add a style test for new grammar and convert all current instances of old grammar. The new grammar is optional in 2.5 < Python < 3.0 and the new normal in Python 3. Now that we have dropped Py2.5 support, this change will reduce the number of conversions made by 2to3.

Please pull from the exp-new-except branch.

https://gitorious.org/stem-robinson/stem-robinson/commits/exp-new-except

Child Tickets

Change History (1)

comment:1 Changed 4 years ago by atagar

  • Resolution set to fixed
  • Status changed from new to closed

Interested. Actually I didn't know about the alternate syntax. :)

It would be nice if the style checker could cover exceptions by other names (or better, warn if another name is used so patch contributors could know that we've standardized on 'exc') but a trivial way of doing that isn't coming to mind. Oh well.

Note: See TracTickets for help on using tickets.