Why are p and p8 different in the following code?
The beginning of a view function (in file views.py in a Django app named "proteinSearch" with a model named "Protein" that has a field named "description"):
def searchForProteins2(request, searchStr):
p8 = Protein.objects.filter( description__icontains=searchStr)
#Why doesn't this work?????
p = Protein.objects.filter( description__icontains=searchStr)
import pdb; pdb.set_trace()
Interactively in pdb:
(Pdb) searchStr
u'centr'
(Pdb) p8
[<Protein: IPI00657962.1>, <Protein: IPI00479143.2>, <Protein: IPI00477050.4>, <Protein: IPI00220625.1>,
95.2>]
(Pdb) p
*** SyntaxError: SyntaxError('unexpected EOF while parsing', ('<string>', 0, 0, ''))