0

I need to use one python library which is available only in 3.4 but my framework runs on python version 2.7 and i want to use that lib to build extension search a lot but found very less info about forward compatibility. checked lib called future but didn't get much info on docs.python.

anyone has any clue then please share.

1 Answer 1

2

Generally speaking, module that are provided for python >3 are absolutely not compatible with python 2. The special future import allows to create a module that is compatible by importing into python 2 some of the behaviors of python 3 that would otherwise be breaking, such as the division.

So most of the time, there is no simple way to import a 3.x module in 2.x, sorry

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.