找出发票渲染器里的 bug

来自 作用域与命名空间
Python 3.14 进阶 4分钟 找出 1处问题

找出这个发票类中的作用域错误。

Python
currency = "EUR"

class Invoice:
    currency = "USD"

    def render(self):
        return f"{currency} {self.total}"
在试验场中打开
报告错误