This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update locale.__all__
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, virtualspirit
Priority: normal Keywords: patch

Created on 2007-05-01 01:04 by virtualspirit, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
locale-all_public_functions.patch virtualspirit, 2007-05-01 01:04
locale-2.5-currency-format_string.patch virtualspirit, 2007-05-01 01:04
Messages (3)
msg52542 - (view) Author: Humberto Diógenes (virtualspirit) Date: 2007-05-01 01:04
jager:~ humberto$ python2.5
>>> import locale
>>> locale.currency
<function currency at 0x80ef0>

# Here's the problem
>>> from locale import *
>>> currency
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'currency' is not defined


I'm sending two similar patches:
 * One that adds only the two new functions in Python 2.5 (currency and format_string)
 * Other that adds every public function defined inside locale.py (I checked and they're all properly documented):
   * currency, format_string, getdefaultlocale, getlocale, getpreferredencoding, normalize and resetlocale.

I did a simple test only to assure all names are right and it worked:
for f in locale.__all__: getattr(locale, f)

Now you choose which patch is better. :)
msg52543 - (view) Author: Humberto Diógenes (virtualspirit) Date: 2007-05-01 01:04
File Added: locale-2.5-currency-format_string.patch
msg52544 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-05-01 06:08
Thanks for the patch, fixed in rev. 55038, 55039 (2.5).
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 44915
2007-05-01 01:04:23virtualspiritcreate