Skip to content

Commit 43c43de

Browse files
committed
Avoid naming variables after global functions
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 670b5c9 commit 43c43de

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bpython/repl.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ def showsyntaxerror(self, filename=None):
184184
if self.syntaxerror_callback is not None:
185185
self.syntaxerror_callback()
186186

187-
type, value, sys.last_traceback = sys.exc_info()
188-
sys.last_type = type
187+
exc_type, value, sys.last_traceback = sys.exc_info()
188+
sys.last_type = exc_type
189189
sys.last_value = value
190-
if filename and type is SyntaxError:
190+
if filename and exc_type is SyntaxError:
191191
# Work hard to stuff the correct filename in the exception
192192
try:
193193
msg, (dummy_filename, lineno, offset, line) = value.args
@@ -203,8 +203,8 @@ def showsyntaxerror(self, filename=None):
203203
lineno -= 2
204204
value = SyntaxError(msg, (filename, lineno, offset, line))
205205
sys.last_value = value
206-
list = traceback.format_exception_only(type, value)
207-
self.writetb(list)
206+
exc_formatted = traceback.format_exception_only(exc_type, value)
207+
self.writetb(exc_formatted)
208208

209209
def showtraceback(self):
210210
"""This needs to override the default traceback thing

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy