Modify

Opened 3 years ago

#13995 assigned defect

The io.StringIO is available in Python 2.6

Reported by: Ryan J Ollos Owned by: Cinc-th
Priority: normal Component: ChangeLogMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

This can be simplified since we only need to support Python 2.7:

try:
    from StringIO import StringIO
except ImportError:
    # Python 3
    from io import StringIO

io.StringIO was added in Python 2.6. The Exception as e syntax was also added in 2.6 and anyway I don't think we need to support any pre-2.7 versions at this point.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Cinc-th.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.