porimol / countryinfo

A python module for returning data about countries, ISO info and states/provinces within them.
MIT License
140 stars 44 forks source link

.all() improvements #41

Open voidus opened 2 years ago

voidus commented 2 years ago

Semantically, .all() should not be a method of the CountryInfo object, since that one represents the information for a specific country.

Instead, it should probably be a global function. While we're at it, I'd also say it should return a list of CountryInfo objects. If a user wants to access a specific one, they can create a CountryInfo object, so fast access isn't a big issue, and it would hide the json structure from library users.

Implementation-wise, this would be easier after #40