View Single Post
Old 03-31-2021, 11:45 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I'll try to use this thread for smaller questions to avoid spamming up this section even more.

Is there any semantic difference between

Code:
"foobar" in #column
and

Code:
#column in "foobar"
They seem to have the same results when I used them in a GPM template.
They are very different. Consider what happens if
Code:
#column == 'foobar is a strange word'
The first test would succeed. The second test would not.

If in your situation the two always both succeed then you probably should be using '==' instead of 'in'. EDIT: Or one of the list operators.

Last edited by chaley; 03-31-2021 at 02:43 PM.
chaley is offline   Reply With Quote