Skip to content

Commit

Permalink
Merge pull request #362 from enthought/fix/remove-premature-optimization
Browse files Browse the repository at this point in the history
Remove a ridiculous premature optimization.
  • Loading branch information
mdickinson committed Apr 27, 2017
2 parents e2b5988 + 03fdf57 commit 6d4ec92
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions traits/adaptation/adaptation_manager.py
Expand Up @@ -92,10 +92,7 @@ def provides_protocol(type_, protocol):
True if the object provides the protocol, otherwise False.
"""

# We do the 'is' check first as a performance improvement to save us
# a call to 'issubclass'.
return type_ is protocol or issubclass(type_, protocol)
return issubclass(type_, protocol)

#### 'AdaptationManager' protocol ##########################################

Expand Down

0 comments on commit 6d4ec92

Please sign in to comment.