Am Donnerstag, 29. September 2016 21:25:44 UTC+2 schrieb Sjoerd Job Postmus:
>
> Thinking of an alternative route:
>
> It seems to me that the default `method.__bool__` is undesirable in Jinja2 
> templates. I do not know Jinja2 well enough, but maybe they could benefit 
> from a patch where `if`-statements give a warning/error when the expression 
> is a callable (with the default `FunctionType.__bool__`?
>
> This would solve the issue not just for the methods you mention, but more 
> in general.
>
> [Or maybe Python itself should have that warning/error?]
>
> Does that make sense?
>

I don't know if it is possible for Python to warn about this. I create an 
issue on python-ideas.

But your idea seems interesting (at least from a development point of view).

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4386417c-fa74-4388-88e5-cb896b90f73a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to