mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
gh-99325: Remove unused NameError
handling (#99326)
This commit is contained in:
parent
e00d730efe
commit
faf7dfa656
2 changed files with 6 additions and 16 deletions
|
@ -25,12 +25,6 @@ def constructor(object):
|
||||||
|
|
||||||
# Example: provide pickling support for complex numbers.
|
# Example: provide pickling support for complex numbers.
|
||||||
|
|
||||||
try:
|
|
||||||
complex
|
|
||||||
except NameError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
|
|
||||||
def pickle_complex(c):
|
def pickle_complex(c):
|
||||||
return complex, (c.real, c.imag)
|
return complex, (c.real, c.imag)
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,9 @@ except ImportError:
|
||||||
grp = None
|
grp = None
|
||||||
|
|
||||||
# os.symlink on Windows prior to 6.0 raises NotImplementedError
|
# os.symlink on Windows prior to 6.0 raises NotImplementedError
|
||||||
symlink_exception = (AttributeError, NotImplementedError)
|
|
||||||
try:
|
|
||||||
# OSError (winerror=1314) will be raised if the caller does not hold the
|
# OSError (winerror=1314) will be raised if the caller does not hold the
|
||||||
# SeCreateSymbolicLinkPrivilege privilege
|
# SeCreateSymbolicLinkPrivilege privilege
|
||||||
symlink_exception += (OSError,)
|
symlink_exception = (AttributeError, NotImplementedError, OSError)
|
||||||
except NameError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
# from tarfile import *
|
# from tarfile import *
|
||||||
__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError", "ReadError",
|
__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError", "ReadError",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue