On Sep 3, 2:57 pm, James Harris james.harri...@googlemail.com wrote:
On 3 Sep, 14:26, Albert van der Horst alb...@spenarnc.xs4all.nl
wrote:
In article
6031ba08-08c8-416b-91db-ce8ff57ae...@w6g2000yqw.googlegroups.com,
James Harris james.harri...@googlemail.com wrote:
SNIP
So you are
In article 6031ba08-08c8-416b-91db-ce8ff57ae...@w6g2000yqw.googlegroups.com,
James Harris james.harri...@googlemail.com wrote:
SNIP
So you are saying that Smalltalk has base in decimalrnumber where
r is presumably for radix? That's maybe best of all. It preserves the
syntactic requirement of
In article mailman.591.1251468775.2854.python-l...@python.org,
MRAB pyt...@mrabarnett.plus.com wrote:
Steven D'Aprano wrote:
SNIP
Obviously I can't speak for Ken Thompson's motivation in creating this
feature, but I'm pretty sure it wasn't to save typing or space on
punchcards. Even in 1969,
On Aug 21, 2:45 pm, John Nagle na...@animats.com wrote:
snip
In 2009, Unisys finally exited the mainframe hardware business, and the
last of the 36-bit machines, the ClearPath servers, are being phased out.
That line of machines goes back to the UNIVAC 2200 series, and the UNIVAC
1100
In article 6b5ea596-d1e3-483d-ba79-7b139d3c7...@z24g2000yqb.googlegroups.com,
Bearophile bearophileh...@lycos.com wrote:
MRAB:
'_': what if in the future we want to allow them in numbers for clarity?
Hettinger says it's hard (= requires too many changes) to do that and
Python programs don't
In article mailman.346.1251135629.2854.python-l...@python.org,
Derek Martin c...@pizzashack.org wrote:
--W1uEbMXJ1Mj4g6TI
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
On Mon, Aug 24, 2009 at 05:03:28PM +, Steven D'Aprano wrote:
On Mon, 24 Aug 2009 11:21:46
On 2009-09-03, Albert van der Horst alb...@spenarnc.xs4all.nl wrote:
In article mailman.591.1251468775.2854.python-l...@python.org,
MRAB pyt...@mrabarnett.plus.com wrote:
Steven D'Aprano wrote:
SNIP
Obviously I can't speak for Ken Thompson's motivation in creating this
feature, but I'm pretty
On 3 Sep, 14:26, Albert van der Horst alb...@spenarnc.xs4all.nl
wrote:
In article 6031ba08-08c8-416b-91db-ce8ff57ae...@w6g2000yqw.googlegroups.com,
James Harris james.harri...@googlemail.com wrote:
SNIP
So you are saying that Smalltalk has base in decimalrnumber where
r is presumably for
On 3 Sep, 15:35, Grant Edwards inva...@invalid wrote:
...
Obviously I can't speak for Ken Thompson's motivation in creating this
feature, but I'm pretty sure it wasn't to save typing or space on
punchcards. Even in 1969, hex was more common than octal, and yet hex
values are written with
On 3 Sep, 15:54, Albert van der Horst alb...@spenarnc.xs4all.nl
wrote:
In article mailman.346.1251135629.2854.python-l...@python.org,
Derek Martin c...@pizzashack.org wrote:
--W1uEbMXJ1Mj4g6TI
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
On Mon, Aug 24,
Albert van der Horst wrote:
In article 6b5ea596-d1e3-483d-ba79-7b139d3c7...@z24g2000yqb.googlegroups.com,
Bearophile bearophileh...@lycos.com wrote:
MRAB:
'_': what if in the future we want to allow them in numbers for clarity?
Hettinger says it's hard (= requires too many changes) to do
On Monday 24 August 2009 16:14:25 Derek Martin wrote:
In fact, now that I think of it...
I just looked at some old school papers I had tucked away in a family
album. I'm quite sure that in grammar school, I was tought to use a
date format of 8/9/79, without leading zeros. I can't prove it,
On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number System of Radix 2, it follows
M that unary is the common usage for Standard Positional
M Number System of
On Thu, 27 Aug 2009 10:49:27 -0700, Mensanator wrote:
Fine. I'm over it. Point is, I HAVE encountered plenty of people who
DON'T properly understand it, Marilyn Vos Savant, for example.
I'm curious -- please explain. Links please?
You can't
blame me for thinking you don't understand it
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number System of Radix 2, it follows
M that unary is the common usage for Standard Positional
M Number System of Radix 1. That's VERY confusing since such
M a system is
Mensanator wrote:
[ ... ]
If you want your data file to have values entered in hex, or oct, or even
unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll find that Standard Positional Number
Systems are not defined for radix 1.
It has to be tweaked. If the only
On 2009-08-28, Neil Hodgson nyamatongwe+thun...@gmail.com wrote:
Steven D'Aprano:
Obviously I can't speak for Ken Thompson's motivation in creating this
feature, but I'm pretty sure it wasn't to save typing or space on
punchcards.
The original implementation of UNIX was on a PDP-7
On Thu, 27 Aug 2009 10:31:04 -0700, Ethan Furman wrote:
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with you on this one. The
Steven D'Aprano wrote:
On Thu, 27 Aug 2009 10:31:04 -0700, Ethan Furman wrote:
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with you on
Steven D'Aprano:
Obviously I can't speak for Ken Thompson's motivation in creating this
feature, but I'm pretty sure it wasn't to save typing or space on
punchcards.
The original implementation of UNIX was on a PDP-7 which was an
18-bit machine. Octal = 3 bits at a a time which evenly
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with you on this one. The computing world was vastly
different when that design decision
Ethan Furman wrote:
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with you on this one. The computing world was vastly
different when
On Aug 26, 10:27 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Wed, 26 Aug 2009 18:53:04 -0700, Erik Max Francis wrote:
In any case, unary is the standard term for what I'm discussing:
http://en.wikipedia.org/wiki/Unary_numeral_system
snip
This really isn't anywhere
James Harris wrote:
On 27 Aug, 18:31, Ethan Furman et...@stoneleaf.us wrote:
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with
Mensanator mensana...@aol.com (M) wrote:
M On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number System of Radix 2, it follows
M that unary is the common
On 27 Aug, 18:31, Ethan Furman et...@stoneleaf.us wrote:
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with you on this one. The
MRAB wrote:
Ethan Furman wrote:
Steven D'Aprano wrote:
A mistake is still a mistake even if it shared with others.
Treating its with a lead zero as octal was a design error when it was
first thought up
[snippage]
I have to disagree with you on this one. The computing world was
On Aug 27, 2:26 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number
Steven D'Aprano wrote:
Leading zeroes in decimal numbers are *very* common in dates and times.
In banking too, according to someone at work today.
Mel.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 25 Aug 2009 11:45:28 -0700, Mensanator wrote:
On Aug 25, 9:14 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your data file to have values entered in hex, or oct, or
even unary (1=one, 11=two,
On Aug 26, 9:58 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Tue, 25 Aug 2009 11:45:28 -0700, Mensanator wrote:
On Aug 25, 9:14 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your
On Wed, 26 Aug 2009 10:58:12 -0700, Mensanator wrote:
But I certainly wouldn't call it binary, for fear of confusion with
radix-2 binary.
That's my point. Since the common usage of binary is for Standard
Positional Number System of Radix 2, it follows that unary is the
common usage for
On Thu, 27 Aug 2009 01:34:10 +, Steven D'Aprano wrote:
On Wed, 26 Aug 2009 10:58:12 -0700, Mensanator wrote:
But I certainly wouldn't call it binary, for fear of confusion with
radix-2 binary.
That's my point. Since the common usage of binary is for Standard
Positional Number System
Steven D'Aprano wrote:
On Wed, 26 Aug 2009 10:58:12 -0700, Mensanator wrote:
But I certainly wouldn't call it binary, for fear of confusion with
radix-2 binary.
That's my point. Since the common usage of binary is for Standard
Positional Number System of Radix 2, it follows that unary is the
On Wed, 26 Aug 2009 18:53:04 -0700, Erik Max Francis wrote:
In any case, unary is the standard term for what I'm discussing:
http://en.wikipedia.org/wiki/Unary_numeral_system
although Mathworld doesn't seem to know it.
Psst. That's a hint.
Googling for unary number system (unary
On Aug 24, 10:20�pm, Erik Max Francis m...@alcyone.com wrote:
Steven D'Aprano wrote:
On Mon, 24 Aug 2009 09:14:25 -0500, Derek Martin wrote:
Assuming I'm right about that, then the use of a leading 0 to represent
octal actually predates the prevalence of using 0 in dates by almost two
On 25 Aug, 01:25, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 16:23:06 -0700, James Harris wrote:
Sure but while I wouldn't normally want to type something as obscure as
32rst into a file of data I might want to type 0xff00 or similar. That
is far
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your data file to have values entered in hex, or oct, or
even unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll find that Standard Positional Number Systems are
not defined for radix 1.
Of course
On Aug 25, 9:14 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your data file to have values entered in hex, or oct, or
even unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll
On 24 Aug, 03:49, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
...
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
thirdletter of octal as X is thethirdletter of hex.) The numbers
above would be
Scott David Daniels scott.dani...@acm.org (SDD) wrote:
SDD James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
SDD I did a little interpreter where non-base 10 numbers
SDD (up to base 36)
MRAB wrote:
James Harris wrote:
On 23 Aug, 00:16, Mel mwil...@the-wire.com wrote:
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
J. Cliff Dyer wrote:
I had an objection to using spaces in numeric literals last time around
and it still stands, and it still stands in the new one.
What happens if you use a literal like 0x10f 304? Is 304 treated as
decimal or hexadecimal? It's not clear how you would begin to combine
it.
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
...
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
On Monday 24 August 2009 01:04:37 bartc wrote:
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
.thiryseximal.100
Yeah right. So now I first have to type a string, which probably has a
On 24 Aug, 09:05, Erik Max Francis m...@alcyone.com wrote:
...
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of octal as X is the third letter of hex.) The numbers
above would be
James Harris wrote:
On 24 Aug, 09:05, Erik Max Francis m...@alcyone.com wrote:
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of octal as X is the third letter of hex.) The numbers
above would be
James Harris wrote:
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
.thiryseximal.100
Hendrik van Rooyen wrote:
I also tried to include an example of a literal with a base of a Googol but I
ran out of both ink and symbols.
:-)
... or particles in the observable Universe, for that matter.
--
Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/
San Jose, CA, USA 37
On 24 Aug, 09:30, Erik Max Francis m...@alcyone.com wrote:
James Harris wrote:
On 24 Aug, 09:05, Erik Max Francis m...@alcyone.com wrote:
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of
On Aug 23, 7:45 pm, Ben Finney ben+pyt...@benfinney.id.au wrote:
greg g...@cosc.canterbury.ac.nz writes:
J. Cliff Dyer wrote:
What happens if you use a literal like 0x10f 304?
To me the obvious thing to do is concatenate them textually and then
treat the whole thing as a single numeric
On Aug 23, 9:42 pm, James Harris james.harri...@googlemail.com
wrote:
The numbers above would be
0b1011, 0t7621, 0xc26b
Algol68 has the type BITS, that is converted to INT with the ABS
operator.
The numbers above would be:
2r1011, 8r7621, 16rc26b
r is for radix:
James Harris wrote:
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
[ ... ]
int('100', 3)
9
int('100', 36)
1296
This is fine typed into the language directly but couldn't be entered
by the user or read-in from or written to a file.
That's rather beside the point. Literals
On Sun, Aug 23, 2009 at 06:13:31AM +, Steven D'Aprano wrote:
On Sat, 22 Aug 2009 22:19:01 -0500, Derek Martin wrote:
On Sat, Aug 22, 2009 at 02:55:51AM +, Steven D'Aprano wrote:
And the great thing is that now you get to teach yourself to stop
writing octal numbers implicitly and be
On Sun, Aug 23, 2009 at 01:13:32PM +, Matthew Woodcraft wrote:
Dennis Lee Bieber wlfr...@ix.netcom.com writes:
About the only place one commonly sees leading zeros on decimal
numbers, in my experience, is zero-filled COBOL data decks (and since
classic COBOL stores in BCD anyway...
On Mon, Aug 24, 2009 at 08:56:48AM -0500, Derek Martin wrote:
On Sun, Aug 23, 2009 at 01:13:32PM +, Matthew Woodcraft wrote:
A more common case is dates.
I suppose this is true, but [...]
I tend to also discount this example, because when we write dates
with leading zeros, usually it's
J. Cliff Dyer j...@sdf.lonestar.org wrote:
I had an objection to using spaces in numeric literals last time around
and it still stands, and it still stands in the new one.
Or, we can use U+00A0 NO-BREAK SPACE, once we already have unicode
variable names :-)
(probably some people would find it
On Aug 24, 6:56 am, Derek Martin c...@pizzashack.org wrote:
I think
hard-coding dates is more uncommon than using octal. ;-) [It
unquestionably is, for me personally.]
You just don't get it, do you? Do you really think this is a contest
over what's more common and the winner gets to choose
On Mon, 24 Aug 2009 12:45:25 +1000, Ben Finney wrote:
greg g...@cosc.canterbury.ac.nz writes:
J. Cliff Dyer wrote:
What happens if you use a literal like 0x10f 304?
To me the obvious thing to do is concatenate them textually and then
treat the whole thing as a single numeric literal.
On Mon, Aug 24, 2009 at 05:22:39PM +0200, Hendrik van Rooyen wrote:
Assuming I'm right about that, then the use of a leading 0 to
represent octal actually predates the prevalence of using 0 in dates
by almost two decades.
Not quite - at the time I started, punch cards and data entry
Piet van Oostrum wrote:
Scott David Daniels scott.dani...@acm.org (SDD) wrote:
SDD James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
SDD I did a little interpreter where non-base 10
On Mon, Aug 24, 2009 at 08:31:13AM -0700, Carl Banks wrote:
On Aug 24, 6:56 am, Derek Martin c...@pizzashack.org wrote:
I think hard-coding dates is more uncommon than using octal. ;-)
[It unquestionably is, for me personally.]
You just don't get it, do you?
I think I get it just fine,
On Mon, 24 Aug 2009 09:14:25 -0500, Derek Martin wrote:
Assuming I'm right about that, then the use of a leading 0 to represent
octal actually predates the prevalence of using 0 in dates by almost two
decades. And while using leading zeros in other contexts is familiar
to me, I would
On Mon, Aug 24, 2009 at 04:47:43PM +, Steven D'Aprano wrote:
Except of course to anyone familiar with mathematics in the last, oh,
five hundred years or so. Mathematics has used a positional system for
numbers for centuries now: leading zeroes have been insignificant, just
like trailing
On Mon, 24 Aug 2009 11:21:46 -0500, Derek Martin wrote:
since the old
syntax is prevalent both within and without the Python community, making
the change is, was, and always will be a bad idea.
Octal syntax isn't prevalent *at all*, except in a small number of niche
areas.
You've said that
On Mon, 24 Aug 2009 Derek Martin wrote:
Those participating in this thread have pretty much all seem to agree
that the only places where decimal numbers with leading zeros really
are common are either in rather specialized applications, such as
computer-oriented data or serial numbers (which
On Mon, Aug 24, 2009 at 05:03:28PM +, Steven D'Aprano wrote:
On Mon, 24 Aug 2009 11:21:46 -0500, Derek Martin wrote:
since the old syntax is prevalent both within and without the
Python community, making the change is, was, and always will be a
bad idea.
Octal syntax isn't prevalent
En Mon, 24 Aug 2009 14:40:24 -0300, Derek Martin c...@pizzashack.org
escribió:
Why is it so hard for you to accept that intelligent people can
disagree with you, and that what's right for you might be bad for
others?
Ask the same question yourself please.
--
Gabriel Genellina
--
On Mon, Aug 24, 2009 at 04:40:14PM -0300, Gabriel Genellina wrote:
En Mon, 24 Aug 2009 14:40:24 -0300, Derek Martin
c...@pizzashack.org escribió:
Why is it so hard for you to accept that intelligent people can
disagree with you, and that what's right for you might be bad for
others?
Ask
On 24 Aug, 14:05, Mel mwil...@the-wire.com wrote:
James Harris wrote:
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
[ ... ]
int('100', 3)
9
int('100', 36)
1296
This is fine typed into the language directly but couldn't be entered
by the user or read-in from or
On Mon, 24 Aug 2009 16:23:06 -0700, James Harris wrote:
Sure but while I wouldn't normally want to type something as obscure as
32rst into a file of data I might want to type 0xff00 or similar. That
is far clearer than 65280 in some cases.
My point was that int('ff00', 16) is OK for the
On Mon, 24 Aug 2009 12:40:24 -0500, Derek Martin wrote:
On Mon, Aug 24, 2009 at 05:03:28PM +, Steven D'Aprano wrote:
On Mon, 24 Aug 2009 11:21:46 -0500, Derek Martin wrote:
since the old syntax is prevalent both within and without the Python
community, making the change is, was, and
On Aug 24, 7:25 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 16:23:06 -0700, James Harris wrote:
Sure but while I wouldn't normally want to type something as obscure as
32rst into a file of data I might want to type 0xff00 or similar. That
is far
Steven D'Aprano wrote:
On Mon, 24 Aug 2009 09:14:25 -0500, Derek Martin wrote:
Assuming I'm right about that, then the use of a leading 0 to represent
octal actually predates the prevalence of using 0 in dates by almost two
decades. And while using leading zeros in other contexts is familiar
On Aug 24, 8:21�pm, Mel mwil...@the-wire.com wrote:
Mensanator wrote:
[ ... ]
If you want your data file to have values entered in hex, or oct, or even
unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll find that Standard Positional Number
Systems are not
On Sat, 22 Aug 2009 22:19:01 -0500, Derek Martin wrote:
On Sat, Aug 22, 2009 at 02:55:51AM +, Steven D'Aprano wrote:
I can see how 012 can
be confusing to new programmers, but at least it's legible, and the
great thing about humans is that they can be taught (usually).
And the great
On Sat, 22 Aug 2009 14:54:41 -0700 (PDT), James Harris wrote:
They look good - which is important. The trouble (for me) is that I
want the notation for a new programming language and already use these
characters. I have underscore as an optional separator for groups of
digits - 123000 and
MRAB:
'_': what if in the future we want to allow them in numbers for clarity?
Hettinger says it's hard (= requires too many changes) to do that and
Python programs don't have big integer constants often enough, so
probably that improvement will not see the light.
In the meantime in a Python
In comp.lang.python James Harris james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
...
What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ?
They look good - which is important. The trouble (for me) is that I
want the notation for a new
Dennis Lee Bieber wlfr...@ix.netcom.com writes:
About the only place one commonly sees leading zeros on decimal
numbers, in my experience, is zero-filled COBOL data decks (and since
classic COBOL stores in BCD anyway... binary (usage is
computational/comp-1) was a later add-on to the
garabik-news-2005...@kassiopeia.juls.savba.sk writes:
Why not just use the space? 123 000 looks better than 123_000, and is
not syntactically ambiguous (at least in python). And as it already
works for string literals, it could be applied to numbers, too…
+1 to all this. I think this
I had an objection to using spaces in numeric literals last time around
and it still stands, and it still stands in the new one.
What happens if you use a literal like 0x10f 304? Is 304 treated as
decimal or hexadecimal? It's not clear how you would begin to combine
it The way string
garabik-news-2005...@kassiopeia.juls.savba.sk wrote in message
news:h6r4fb$18...@aioe.org...
In comp.lang.python James Harris james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
...
What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ?
They
On 21 Aug, 00:59, James Harris james.harri...@googlemail.com wrote:
...
Is there some magic to make the 2.x CPython interpreter to ignore the
annoying octal notation?
I'd really like 012 to be 12 and not 10.
This is (IMHO) a sad hangover from C (which took it from B ...
This seemed
On 23 Aug, 04:38, c...@tiac.net (Richard Harter) wrote:
On Sat, 22 Aug 2009 14:54:41 -0700 (PDT), James Harris
james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
... (snipped a discussion on languages and other systems interpreting
numbers with a
On 23 Aug, 00:16, Mel mwil...@the-wire.com wrote:
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
On 23 Aug, 21:55, James Harris james.harri...@googlemail.com wrote:
...
However for floating point you
need at least three letters because a floating point number has
three parts: the fixed point point, the exponent base, and the
exponent. Now we can represent the radices of the
James Harris wrote:
On 23 Aug, 00:16, Mel mwil...@the-wire.com wrote:
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
I did a little interpreter where non-base 10 numbers
(up to base 36) were:
.7.100 == 64 (octal)
.9.100 == 100 (decimal)
Scott David Daniels scott.dani...@acm.org wrote in message
news:kn2dnszr5b0bwazxnz2dnuvz_s-dn...@pdx.net...
James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
I did a little interpreter
bartc ba...@freeuk.com wrote:
Scott David Daniels scott.dani...@acm.org wrote in message
news:kn2dnszr5b0bwazxnz2dnuvz_s-dn...@pdx.net...
James Harris wrote:...
Another option:
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might
J. Cliff Dyer wrote:
What happens if you use a literal like 0x10f 304?
To me the obvious thing to do is concatenate them
textually and then treat the whole thing as a single
numeric literal. Anything else wouldn't be sane, IMO.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Max Erickson maxerick...@gmail.com writes:
At some point, abandoning direct support for literals and just
having a function that can handle different bases starts to make a
lot of sense to me:
int('100', 8)
64
int('100', 10)
100
int('100', 16)
256
int('100', 2)
4
int('100', 3)
greg g...@cosc.canterbury.ac.nz writes:
J. Cliff Dyer wrote:
What happens if you use a literal like 0x10f 304?
To me the obvious thing to do is concatenate them textually and then
treat the whole thing as a single numeric literal. Anything else
wouldn't be sane, IMO.
Yet, as was pointed
Il Fri, 21 Aug 2009 16:52:29 -0700 (PDT), James Harris ha scritto:
0xff 0x0e | 0b1101
16rff 16r0e | 2r1101
Hmm. Maybe a symbol would be better than a letter.
What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ?
David
--
Il Fri, 21 Aug 2009 10:36:35 -0700 (PDT), Mensanator ha scritto:
Aha! Then I WAS right after all. Switch to 3.1 and you'll
soon be cured of that bad habit:
012 + 012
SyntaxError: invalid token (pyshell#4, line 1)
I have tre (four) problems:
1) I am forced to use 2.5 since the production
Il Thu, 20 Aug 2009 16:59:14 -0700 (PDT), James Harris ha scritto:
It maybe made sense once but this relic of the past should have been
consigned to the waste bin of history long ago.
I perfectly agree with you!
David.
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
On Fri, 21 Aug 2009 16:52:29 -0700 (PDT), James Harris
james.harri...@googlemail.com declaimed the following in
gmane.comp.python.general:
So you are saying that Smalltalk has base in decimalrnumber where
r is presumably for radix? That's maybe best of all. It
David wrote:
Il Fri, 21 Aug 2009 16:52:29 -0700 (PDT), James Harris ha scritto:
0xff 0x0e | 0b1101
16rff 16r0e | 2r1101
Hmm. Maybe a symbol would be better than a letter.
What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ?
'_': what if in the future we want to allow
On 2009-08-22, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Fri, 21 Aug 2009 10:45:51 -0700, John Nagle na...@animats.com
declaimed the following in gmane.comp.python.general:
And it's over. We can finally dispense with octal by default.
I've not looked at modern Intel
1 - 100 of 128 matches
Mail list logo