The *is* comparator is quite error prone for misunderstanding it (as we could observed some times) maybe it worths to link python docs about it: https://docs.python.org/3.5/reference/expressions.html#is
Well, that Python docs doesn't say to much (lack of examples) >>> a = 'pub' >>> b = ''.join(['p','u','b']) >>> a == b True >>> a is b False a == b it's the same as id(a) == id(b) I think we should give an emphasis on this because are going to cause problems to some people. Hope it helps. El jueves, 7 de abril de 2016, 23:43:21 (UTC+2), Stephen escribió: > > Hello, > > I reviewed > > https://github.com/django/django/commit/c00ae7f5 > > while updating the features of Grantlee, and I have the following notes: > > * The unit tests added both have the same name ("template"). They should > have different names of the form 'if-tag-isNN' > * The feature does not work the same way as django 'is' works. For > example: > > In: t = e.from_string( > "{% if \"True\" is \"True\" %}yes{% else %}no{% endif %}") > In: t.render(c) > > Out: 'no' > > The feature 'if ... is' feature looks like it needs more design > consideration before it is released. > > Thanks, > > Steve. > > > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/d94f9eac-469f-48cf-bb73-09fe17572f9e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
