[Python-checkins] r70436 - peps/trunk/pep-0378.txt

raymond.hettinger python-checkins at python.org
Tue Mar 17 20:38:35 CET 2009


Author: raymond.hettinger
Date: Tue Mar 17 20:38:35 2009
New Revision: 70436

Log:
Add notes on what Java does.

Modified:
   peps/trunk/pep-0378.txt

Modified: peps/trunk/pep-0378.txt
==============================================================================
--- peps/trunk/pep-0378.txt	(original)
+++ peps/trunk/pep-0378.txt	Tue Mar 17 20:38:35 2009
@@ -141,6 +141,16 @@
 
 .. _`COBOL`: http://en.wikipedia.org/wiki/Cobol#Syntactic_features
 
+Java offers a `Decimal.Format Class`_ that uses picture patterns (one
+for positive numbers and an optional one for negatives) such as:
+``"#,##0.00;(#,##0.00)"``. It allows arbitrary groupings including
+hundreds and ten-thousands and uneven groupings.  The special patten
+characters are non-localized (using a DOT for a decimal separator and
+a COMMA for a grouping separator).  The user can supply an alternate
+set of symbols using the formatter's *DecimalFormatSymbols* object.
+
+.. _`Decimal.Format Class`: http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html
+
 
 Alternative Proposal (from Eric Smith, originally called Proposal II)
 =====================================================================


More information about the Python-checkins mailing list