February 2006
Intermediate to advanced
648 pages
14h 53m
English
New language features that affect compatibility with older versions of Python are often disabled when they first appear in a release. To enable these features, the statement from __future__ import feature can be used. For example:
# Enable new division semantics from __future__ import division
When used, this statement should appear as the first statement of a module or program. Furthermore, the intent of the __future__ module is to introduce features that will eventually be a standard part of the Python language (in which case the use of __future__ will not be required).
Read now
Unlock full access