[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
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
"[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
"[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
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
> 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
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:
>
>
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
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
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
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
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
"[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
"[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
"[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
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
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
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"
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
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
> > >
"[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
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
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.
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
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
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
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
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
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,
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
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
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,
32 matches
Mail list logo