Code AnalysisBeginner 60s
Module boundary violation
# package: billing.internal
class TaxTable:
RATES = {}
# package: ordering (should not know billing internals)
from billing.internal import TaxTable
class OrderService:
def total(self, items):
return sum(i.price for i in items) * (1 + TaxTable.RATES.get('US', 0))
The ordering module reaches into billing's internal package. Which enforcement is most effective and what is the principle?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.