mirror of
https://github.com/python/cpython.git
synced 2025-08-29 21:25:01 +00:00
[Patch #965175] Incorporate a suggestion for a better error message
This commit is contained in:
parent
3e377decef
commit
f027ca8167
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue