Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 4 years ago

#1857 closed defect (fixed)

[PATCH] Refactoring: spam[:4] == 'eggs' => spam.startswith('eggs')

Reported by: trac@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.8.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This is a patch against [2037] that changes occurrences of

spam[:4] == 'eggs'
spam[-4:] == 'eggs'

to

spam.startswith('eggs')
spam.endswith('eggs')

This conforms with the Python style guide.

Attachments (1)

startswith_r2037.patch (5.5 KB ) - added by trac@… 19 years ago.
Patch against [2037]

Download all attachments as: .zip

Change History (2)

by trac@…, 19 years ago

Attachment: startswith_r2037.patch added

Patch against [2037]

comment:1 by Matthew Good, 19 years ago

Resolution: fixed
Status: newclosed

Ah yes, this is actually a pet peeve of mine too. Committed in [2038].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.