[New-bugs-announce] [issue23657] Don't do isinstance checks in zipapp
report at bugs.python.org
Fri Mar 13 15:50:10 CET 2015
New submission from Brett Cannon:
As it stand, zipapp's code checks for str and then otherwise assumes an object is a file-like object. It might work out better to do some duck typing and simply check if an object has 'read' and 'readline' attributes then it's a file-like object and otherwise that it's a path.
Doing this would then potentially make it easier to use pathlib.Path through the module rather than the os module.
components: Library (Lib)
nosy: brett.cannon, pmoore
stage: needs patch
title: Don't do isinstance checks in zipapp
versions: Python 3.5
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce