mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Remove redundant code for unsupported Python versions (#49486)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/49486 Remove code for Python 3.5 and lower. There's more that can be removed/modernised, but sticking mainly to redundant version checks here, to keep the diff/PR smaller. Pull Request resolved: https://github.com/pytorch/pytorch/pull/46579 Reviewed By: zou3519 Differential Revision: D24453571 Pulled By: ezyang fbshipit-source-id: c2cfcf05d6c5f65df64d89c331692c9aec09248e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
09eb468398
commit
473e78c0fa
@ -192,7 +192,7 @@ def storage_to_tensor_type(storage):
|
||||
|
||||
def _is_path(name_or_buffer):
|
||||
return isinstance(name_or_buffer, str) or \
|
||||
(sys.version_info[0] == 3 and isinstance(name_or_buffer, pathlib.Path))
|
||||
isinstance(name_or_buffer, pathlib.Path)
|
||||
|
||||
|
||||
class _opener(object):
|
||||
|
Reference in New Issue
Block a user