>
> You don't need list comprehension, you can use a for loop.
>
> You don't need upacking you can use indexing.
>
> And you don't need lazy, it's just convenient.
>

With this sole argument you can add almost anything to the language as long
as it has at least one use case where it's better than existing tools. I'm
not against the lazy proposal in general, but attempting to justify a new
keyword to replace this is just silly to me:

class Config(dict):
    def lazy_get(self, key, callable=None):
        if key in self:
            return self[key]
        return callable(key)
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to