Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-02 Thread Steven D'Aprano
On Tue, 02 Sep 2008 11:13:27 +1000, Ben Finney wrote: [EMAIL PROTECTED] writes: For Python 2.7/3.1 I'd now like to write a PEP regarding the underscores into the number literals, like: 0b_0101_, 268_435_456 etc. +1 on such a capability. -1 on underscore as the separator. When

Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-02 Thread Nick Craig-Wood
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ben Finney: I don't see any good reason (other than your familiarity with the D language) to use underscores for this purpose, and much more reason (readability, consistency, fewer arbitrary differences in syntax, perhaps simpler implementation)

Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-02 Thread Peter Pearson
On 02 Sep 2008 06:10:51 GMT, Steven D'Aprano wrote: At the risk of bike-shedding, [snip] (startled noises) It is a delight to find a reference to that half-century-old essay (High Finance) by the wonderful C. Northcote Parkinson, but how many readers will catch the allusion? -- To email me,

Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-02 Thread Patrick Maupin
On Sep 2, 6:35 am, Nick Craig-Wood [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:  It's not just my familiarity, Ada language too uses underscore for  that purpose, I think, so there's a precedent, and Ada is a language  designed to always minimize programming errors,

Re: Py 2.6 changes

2008-09-02 Thread Chris Rebert
On Mon, Sep 1, 2008 at 6:02 PM, Mensanator [EMAIL PROTECTED] wrote: On Sep 1, 6:55�pm, [EMAIL PROTECTED] wrote: Steven D'Aprano: productory() -- I don't know that function, and googling mostly comes up with retail product searches. Do you mean product(), Darn my English, you are right,

Py 2.6 changes

2008-09-01 Thread bearophileHUGS
I have just re-read the list of changes in Python 2.6, it's huge, there are tons of changes and improvements, I'm really impressed: http://docs.python.org/dev/whatsnew/2.6.html I'll need many days to learn all those changes! I can see it fixes several of the missing things/problems I have found

Re: Py 2.6 changes

2008-09-01 Thread Christian Heimes
[EMAIL PROTECTED] wrote: I presume it's better for me to not hold my breath while I wait CPython to be written in C99 :-) First you have to convince Microsoft to release C99 compiler ... good luck! Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Py 2.6 changes

2008-09-01 Thread Alan G Isaac
[EMAIL PROTECTED] wrote: Now math has factorial: http://docs.python.org/dev/library/math.html#math.factorial That's rather underdocumented. Does it really attempt exact calculation for arbitrary integers?? Is there any way to request a nice fast approximation for large integers (e.g., with

Re: Py 2.6 changes

2008-09-01 Thread Steven D'Aprano
On Mon, 01 Sep 2008 12:15:53 -0700, bearophileHUGS wrote: Now math has factorial: http://docs.python.org/dev/library/math.html#math.factorial Seen how reduce() is removed from Python 3 (I know it's in itertools), and seeing that for me to write a productory() function was the first usage I

Re: Py 2.6 changes

2008-09-01 Thread bearophileHUGS
Steven D'Aprano: productory() -- I don't know that function, and googling mostly comes up with retail product searches. Do you mean product(), Darn my English, you are right, sorry, I meant a product() of course :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Py 2.6 changes

2008-09-01 Thread Mensanator
On Sep 1, 6:55�pm, [EMAIL PROTECTED] wrote: Steven D'Aprano: productory() -- I don't know that function, and googling mostly comes up with retail product searches. Do you mean product(), Darn my English, you are right, sorry, I meant a product() of course :-) But the name product() has

Re: Py 2.6 changes

2008-09-01 Thread Mensanator
On Sep 1, 2:15�pm, [EMAIL PROTECTED] wrote: I have just re-read the list of changes in Python 2.6, it's huge, there are tons of changes and improvements, I'm really impressed:http://docs.python.org/dev/whatsnew/2.6.html I'll need many days to learn all those changes! I can see it fixes

Numeric literal syntax (was: Py 2.6 changes)

2008-09-01 Thread Ben Finney
[EMAIL PROTECTED] writes: For Python 2.7/3.1 I'd now like to write a PEP regarding the underscores into the number literals, like: 0b_0101_, 268_435_456 etc. +1 on such a capability. -1 on underscore as the separator. When you proposed this last year, the counter-proposal was made

Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-01 Thread bearophileHUGS
Ben Finney: I don't see any good reason (other than your familiarity with the D language) to use underscores for this purpose, and much more reason (readability, consistency, fewer arbitrary differences in syntax, perhaps simpler implementation) to use whitespace just as with string literals.