I am interested in understanding the purpose of the following pieces of code:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
I have read up from the manual and other articles that this is the purpose: https://docs.python.org/3/library/future.html
I am not sure I am interpreting this correctly. Hence I'm wondering if futures is to make the code 'future-proof', i.e Python 2 and Python 3 applicable. If this is the right understanding, should I be doing this in all my code from now on?
Thanks!