Proposal: Decimal literals in Python.

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Oct 26 07:56:56 EDT 2007


On Fri, 26 Oct 2007 19:19:46 +1000, Ben Finney wrote:

>> Of course we can intruduce a single character function name as an alias
>> for the Decimal type constructor, but even then we have to use both
>> parentheses and quotes for each and every decimal constant. We cannot
>> make it shorter than D("12.34")
> 
> Nor should we. A function or type name should be short but explicit, and
> 'Decimal' is about as short as I'd want.

You don't like str, int, float, list, set, dict, or bool?

Or for that matter, enum
http://www.python.org/dev/peps/pep-0354/

*wink*


-- 
Steven.



More information about the Python-list mailing list