Recommended "from __future__ import" options for Python 2.5.2?
danb_83 at yahoo.com
Sat Apr 12 21:30:08 CEST 2008
On Apr 12, 1:41 pm, "Malcolm Greene" <pyt... at bdurham.com> wrote:
> Is there any consensus on what "from __future__ import" options
> developers should be using in their Python 2.5.2 applications?
> Is there a consolidated list of "from __future__ import" options to
> choose from?
Just look inside the __future__ module.
Already mandatory features. You don't need to import them.
Import this one if you're using the feature. And for forward
compatibility, don't use "with" as a variable name.
I haven't followed this one.
ALWAYS import this in new modules. Otherwise, you'll be very likely
to get burned my code as simple as
return sum(seq) / len(seq)
More information about the Python-list