mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
Raise statement normalization in Lib/.
This commit is contained in:
parent
8b3febef2f
commit
ce36ad8a46
80 changed files with 502 additions and 530 deletions
|
@ -328,7 +328,7 @@ class Doc:
|
|||
"""Raise an exception for unimplemented types."""
|
||||
message = "don't know how to document object%s of type %s" % (
|
||||
name and ' ' + repr(name), type(object).__name__)
|
||||
raise TypeError, message
|
||||
raise TypeError(message)
|
||||
|
||||
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
|
||||
|
||||
|
@ -1463,7 +1463,7 @@ def resolve(thing, forceload=0):
|
|||
if isinstance(thing, str):
|
||||
object = locate(thing, forceload)
|
||||
if not object:
|
||||
raise ImportError, 'no Python documentation found for %r' % thing
|
||||
raise ImportError('no Python documentation found for %r' % thing)
|
||||
return object, thing
|
||||
else:
|
||||
return thing, getattr(thing, '__name__', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue