Skip to content

Commit

Permalink
Replace redundant str instances with super()
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Mar 4, 2018
1 parent ad6b744 commit c60d787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cachesimulator/bin_addr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ class BinaryAddress(str):
def __new__(cls, bin_addr=None, word_addr=None, num_addr_bits=0):

if word_addr is not None:
return str.__new__(
return super().__new__(
cls, bin(word_addr)[2:].zfill(num_addr_bits))
else:
return str.__new__(cls, bin_addr)
return super().__new__(cls, bin_addr)

@classmethod
def prettify(cls, bin_addr, min_bits_per_group):
Expand Down

0 comments on commit c60d787

Please sign in to comment.