TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Six: Python 2 and 3 Compatibility Library

17 pointsby flexterraalmost 13 years ago

1 comment

lelelealmost 13 years ago
I don't understand why you can't mix and match Python 2 and Python 3. I mean: Python can link C libraries and it can't link libraries from a different Python version? Having different languages coexist and call each other in an application is not a thing from the outer space.<p>Have an declaration at the top of the source file that states what Python version the source file is and/or use a versioned file extension and be done with it. If you want to take advantage of Python 3 features in a Python 2 source file, you'll have to upgrade the source file, that would be a given.<p>Maybe a Pythonista here will answer. But then, I've seen this mismatch between versions of other languages, too. Either language designers or I are missing something here.