Re: From D

2007-07-31 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > code files? What's the regular expression for > locating a number with an arbitrary number of digits > seperated into an arbitrary number of blocks of an > arbitray number of digits with an arbitrary number > of whitespace characters between each bloc

Re: From D

2007-07-30 Thread [EMAIL PROTECTED]
Gabriel Genellina wrote: > En Tue, 24 Jul 2007 11:10:53 -0300, Stargaming <[EMAIL PROTECTED]> > escribió: > >> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: >> >>> There are various things I like about the D language that I think Python >>> too may enjoy. Here are few bits (mostly sy

Re: From D

2007-07-26 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > The str.split method has no bearing on this discussion, > > It most certainly does. To make '123 456' into an integer, > you split it and then join it. Indeed. Which has nothing to do with the Python syntax for creating a numeric literal in cod

Re: From D

2007-07-26 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > So, just as > > >>> int('123' '456') > 123456 > > is not an error, the proposal is that > > >>> a = 123 456 > SyntaxError: invalid syntax > > will not be an error either. More directly: Just as these three statements create the

Re: From D

2007-07-26 Thread Tim Williams
On 26/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> The str.split method has no bearing on this discussion, > It most certainly does. To make '123 456' into an integer, > you split it and then join it. > >>> z = '123 456' > >>> y = z.split() > >>> x = ''.join(y) > >>> w = int(x) > >>> w

RE: From D

2007-07-26 Thread Ryan Ginstrom
> On Behalf Of Leo Petr > Digits are grouped in 2s in India and in 4s in China and Japan. This is not entirely true in Japan's case. When written without Japanese characters, Japan employs the same format as the US, for example: 1,000,000 (However, they would read this as 百万 (hyaku man), literall

Re: From D

2007-07-26 Thread Kay Schluehr
On Jul 25, 7:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 24, 6:08 pm, Steven D'Aprano > > > > <[EMAIL PROTECTED]> wrote: > > On Tue, 24 Jul 2007 20:09:00 +0200, Bjoern Schliessmann wrote: > > > Stargaming wrote: > > >> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > >

Re: From D

2007-07-26 Thread [EMAIL PROTECTED]
On Jul 26, 12:18 am, Ben Finney <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > IDLE 1.2c1 > > >>> s = '123 456' > > >>> s.split() > > ['123', '456'] > > The str.split method has no bearing on this discussion, It most certainly does. To make '123 456' into an integ

Re: From D

2007-07-26 Thread [EMAIL PROTECTED]
On Jul 26, 1:24 am, Ben Finney <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > On Jul 25, 9:04?pm, Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > > Why does it make no sense? Have you never had to scrape a web page > > or read a CSV file? > > Again, unrelated to t

Re: From D

2007-07-26 Thread Leo Petr
On Jul 24, 10:10 am, Stargaming <[EMAIL PROTECTED]> wrote: > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > > There are various things I like about the D language that I think Python > > too may enjoy. Here are few bits (mostly syntactical ones): > > > 1) (we have discussed part of thi

Re: From D

2007-07-26 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Propose: > 123 456 789 => 123456789 > 123.456 789 => 123.456789 +1 -- http://mail.python.org/mailman/listinfo/python-list

Re: From D

2007-07-26 Thread bearophileHUGS
Sorry for the slow feedback. Stargaming>Sounds like a good thing to be but the arbitrary positioning doesnt make any sense.< The arbitrary positioning allows you to denote 4-digit groups too in binary/hex literals, like in my example: auto x = 0b0100_0011; Stargaming>fits into the current movem

Re: From D

2007-07-25 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > On Jul 25, 9:04?pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: > Why does it make no sense? Have you never had to scrape a web page > or read a CSV file? Again, unrelated to the way the Python compiler syntactically treats the source code. > So

Re: From D

2007-07-25 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > On Jul 25, 8:54?pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: > Any number of whitespace characters? Just spaces or all whitespace > characters? > What about searching source code files? What's the regular > expression for locating a number wit

Re: From D

2007-07-25 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > IDLE 1.2c1 > >>> s = '123 456' > >>> s.split() > ['123', '456'] The str.split method has no bearing on this discussion, which is about the Python language syntax, and numeric literal values in particular. -- \"Pinky, are you pondering w

Re: From D

2007-07-25 Thread [EMAIL PROTECTED]
On Jul 25, 9:04?pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 25 Jul 2007 18:17:19 -0700, [EMAIL PROTECTED] wrote: > > On Jul 25, 8:00 pm, Ben Finney <[EMAIL PROTECTED]> > > wrote: > >> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > >> > On Jul 24, 6:08 pm, Steven D'Aprano > >> > <[EM

Re: From D

2007-07-25 Thread [EMAIL PROTECTED]
On Jul 25, 8:54?pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 25 Jul 2007 10:22:46 -0700, [EMAIL PROTECTED] wrote: > > On Jul 24, 6:08 pm, Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > >> On Tue, 24 Jul 2007 20:09:00 +0200, Bjoern Schliessmann wrote: > >> > Stargaming wrote: > >> >> O

Re: From D

2007-07-25 Thread Steven D'Aprano
On Wed, 25 Jul 2007 18:17:19 -0700, [EMAIL PROTECTED] wrote: > On Jul 25, 8:00 pm, Ben Finney <[EMAIL PROTECTED]> > wrote: >> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: >> > On Jul 24, 6:08 pm, Steven D'Aprano >> > <[EMAIL PROTECTED]> wrote: >> > > Python already does: >> > > "hello-" "world"

Re: From D

2007-07-25 Thread Steven D'Aprano
On Wed, 25 Jul 2007 10:22:46 -0700, [EMAIL PROTECTED] wrote: > On Jul 24, 6:08 pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Tue, 24 Jul 2007 20:09:00 +0200, Bjoern Schliessmann wrote: >> > Stargaming wrote: >> >> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: >> >> >>> While i

Re: From D

2007-07-25 Thread [EMAIL PROTECTED]
On Jul 25, 8:00 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > On Jul 24, 6:08 pm, Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > > > Python already does: > > > "hello-" "world" => "hello-world" > > > > Propose: > > > 123 456 789 => 123456789 > > >

Re: From D

2007-07-25 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > On Jul 24, 6:08 pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: > > Python already does: > > "hello-" "world" => "hello-world" > > > > Propose: > > 123 456 789 => 123456789 > > 123.456 789 => 123.456789 > > So, spaces will no longer be delimiters

Re: From D

2007-07-25 Thread Marc 'BlackJack' Rintsch
On Wed, 25 Jul 2007 10:47:33 -0700, Paddy wrote: > But then,what would _0 be, the number 0 or the name _0 analagous to > a0 Of course the name because numbers have to start with a digit or a dot. Otherwise this would break backwards compatibility. Ciao, Marc 'BlackJack' Rintsch -- http

Re: From D

2007-07-25 Thread star . public
On Jul 25, 1:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > So, spaces will no longer be delimiters? Won't that cause > much wailing and gnashing of teeth? > I can't think of a circumstance in which 48 1906 is valid, so . . . I like it, too :) -- Star Weaver -- http://mail.python.

Re: From D

2007-07-25 Thread Paddy
On Jul 25, 1:47 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 24 Jul 2007 11:10:53 -0300, Stargaming <[EMAIL PROTECTED]> > escribió: > > > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > > >> There are various things I like about the D language that I think Python > >> to

Re: From D

2007-07-25 Thread [EMAIL PROTECTED]
On Jul 24, 6:08 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 24 Jul 2007 20:09:00 +0200, Bjoern Schliessmann wrote: > > Stargaming wrote: > >> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > > >>> While in a syntax like: > >>> for i in xrange(1_000_000): > >>> my eyes help m

Re: From D

2007-07-25 Thread Wildemar Wildenburger
Steven D'Aprano wrote: > Python already does: > "hello-" "world" => "hello-world" > > Propose: > 123 456 789 => 123456789 > 123.456 789 => 123.456789 > > I second that! /W -- http://mail.python.org/mailman/listinfo/python-list

Re: From D

2007-07-25 Thread Jakub Stolarski
On Jul 25, 1:08 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Underscores in numerics are UGLY. Why not take a leaf out of implicit > string concatenation and allow numeric literals to implicitly concatenate? > > Python already does: > "hello-" "world" => "hello-world" > > Propose: > 123 456 789

Re: From D

2007-07-24 Thread Gabriel Genellina
En Tue, 24 Jul 2007 11:10:53 -0300, Stargaming <[EMAIL PROTECTED]> escribió: > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > >> There are various things I like about the D language that I think Python >> too may enjoy. Here are few bits (mostly syntactical ones): >> >> 1) (we have

Re: From D

2007-07-24 Thread [EMAIL PROTECTED]
On Jul 24, 5:19 am, [EMAIL PROTECTED] wrote: > There are various things I like about the D language that I think > Python too may enjoy. Here are few bits (mostly syntactical ones): > > 1) (we have discussed part of this in the past) You can put > underscores inside number literals, like 1_000_000,

Re: From D

2007-07-24 Thread Steven D'Aprano
On Tue, 24 Jul 2007 20:09:00 +0200, Bjoern Schliessmann wrote: > Stargaming wrote: >> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > >>> While in a syntax like: >>> for i in xrange(1_000_000): >>> my eyes help me group them at once. >> >> Sounds like a good thing to be but the arbi

Re: From D

2007-07-24 Thread Bjoern Schliessmann
Stargaming wrote: > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: >> While in a syntax like: >> for i in xrange(1_000_000): >> my eyes help me group them at once. > > Sounds like a good thing to be but the arbitrary positioning > doesnt make any sense. Checking underscore positions

Re: From D

2007-07-24 Thread Stargaming
On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > There are various things I like about the D language that I think Python > too may enjoy. Here are few bits (mostly syntactical ones): > > 1) (we have discussed part of this in the past) You can put underscores > inside number literals,