By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,563 Members | 1,307 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,563 IT Pros & Developers. It's quick & easy.

Recommended "from __future__ import" options for Python 2.5.2?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.