You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Brazil file I would like to see a generic class for city. This generic class can be instancied with a string parameter and according to this parameter we will instanciate some specific city class.
Example:
Class GenericCity():
def __new__(cls, city: str):
if city=='sp:
return BrazilSaoPauloCity
elif city =='rj'
return BrazilRiodeJaneiroCity
return super().__new__(cls)
def __init__(cls):
....
city = GenericCity('sp')
city is a BrazilSaoPauloCity class.
@brunobord what do you think?
I can do a PR for this
The text was updated successfully, but these errors were encountered:
In the Brazil file I would like to see a generic class for city. This generic class can be instancied with a string parameter and according to this parameter we will instanciate some specific city class.
Example:
@brunobord what do you think?
I can do a PR for this
The text was updated successfully, but these errors were encountered: