TensorFlowというDeep Learning関連のもので、mnist.pyというpythonコードを学習中。
https://www.tensorflow.org/versions/master/tutorials/mnist/tf/index.html#tensorflow-mechanics-101
そのmnist.pyにある以下の記述について
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
さりんじゃーのプログラミング日記
http://salinger.github.io/python/20140211-future-module/
の
absolute_import節参照。
Python 3 では相対インポートではなく、絶対インポート優先になる。標準モジュールと同名のモジュールがカレントディレクトリにある場合、Python 2 系ではカレントディレクトリのモジュールが優先されていたので、これを使うことで標準モジュールを意図せず上書きしてしまう可能性がなくなる。