def printTheNews(science, ideology):
if science.getTheme() not in ideology.keys():
return
print(science.getTheme(), “says”, ideology[science.getTheme()])
Clearly the press does not care about code quality, because that’s not Pythonic :(
The pythonic version is science.theme - you don’t need a getter
science.theme
I dunno, the press will swallow anything, and then it goes through these cycles of lethargy...
def printTheNews(science, ideology):
if science.getTheme() not in ideology.keys():
return
print(science.getTheme(), “says”, ideology[science.getTheme()])
Clearly the press does not care about code quality, because that’s not Pythonic :(
The pythonic version is
science.theme
- you don’t need a getterI dunno, the press will swallow anything, and then it goes through these cycles of lethargy...