470,591 Members | 2,085 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

Recommended "from __future__ import" options for Python 2.5.2?

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?

Thank you,
Malcolm
Jun 27 '08 #1
1 1997
On Apr 12, 1:41 pm, "Malcolm Greene" <pyt...@bdurham.comwrote:
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.

* nested_scopes
* generators

Already mandatory features. You don't need to import them.

* with_statement

Import this one if you're using the feature. And for forward
compatibility, don't use "with" as a variable name.

* absolute_import

I haven't followed this one.

* division

ALWAYS import this in new modules. Otherwise, you'll be very likely
to get burned my code as simple as

def mean(seq):
return sum(seq) / len(seq)
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Michele Simionato | last post: by
2 posts views Thread by mithrond | last post: by
4 posts views Thread by Ahmed, Shakir | last post: by
2 posts views Thread by python | last post: by
2 posts views Thread by =?ISO-2022-JP?B?GyRCJD8kKxsoQg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.