How to force my whole package to use a __future__ directive? How to force my whole package to use a __future__ directive? python-3.x python-3.x

How to force my whole package to use a __future__ directive?


No, __future__ imports are only valid for a single file. You will have to put this line at the top of every Python source file.

From the documentation:

A future statement is a directive to the compiler that a particular module should be compiled using syntax or semantics that will be available in a specified future release of Python.