Skip to content

Commit

Permalink
fix: Remove redundant __str__ method
Browse files Browse the repository at this point in the history
There were two __str__ methods defined, the first seemed the less sophisticated one.
  • Loading branch information
jh committed Oct 10, 2022
1 parent a70b529 commit 8cd2d17
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions restcountries/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ def get_countries_by_capital(cls, capital, filters=None):


class Country:
def __str__(self):
return "{}".format(self.name)

def __init__(self, country_data):
self.top_level_domain = country_data.get("topLevelDomain")
self.alpha2_code = country_data.get("alpha2Code")
Expand Down

0 comments on commit 8cd2d17

Please sign in to comment.