![](https://secure.gravatar.com/avatar/d995b462a98fea412efa79d17ba3787a.jpg?s=120&d=mm&r=g)
On 7 April 2016 at 20:43, Ethan Furman <ethan@stoneleaf.us> wrote:
On 04/07/2016 12:17 PM, Brett Cannon wrote:
How do you make Python 3.3 code work with this when the ABC will simply not be available to you unless you're running Python 3.4.3, 3.5.2, or 3.6.0 (under the assumption that the ABC is put in pathlib and backported thanks to its provisional status)? The ternary operator one-liner is backwards-compatible while the ABC is only forward-compatible.
__os_path__ (or whatever it's called) also won't be available on those earlier versions -- so I'm not seeing that the ABC route as any worse.
Am I missing something?
You can check for __os_path__ even if it doesn't exist (hasattr takes the name as a string), but you can't check for the ABC if it doesn't exist (isinstance takes the actual ABC as the argument). Paul