mirror of https://github.com/python/cpython
[Patch #965175] Incorporate a suggestion for a better error message
This commit is contained in:
parent
3e377decef
commit
f027ca8167
|
@ -375,7 +375,8 @@ class ParserBase:
|
|||
return name.lower(), m.end()
|
||||
else:
|
||||
self.updatepos(declstartpos, i)
|
||||
self.error("expected name token")
|
||||
self.error("expected name token at %r"
|
||||
% rawdata[declstartpos:declstartpos+20])
|
||||
|
||||
# To be overridden -- handlers for unknown objects
|
||||
def unknown_decl(self, data):
|
||||
|
|
Loading…
Reference in New Issue