.split() Qeustion

L

Lele Gaifax

As a stupid scientist, I have the habbit to compare
things of the same nature with the same units.

This *string* containing one *character*

26

consumes 26 *bytes*.

I'm not an expert in stupid science, and I fail to see the "common"
nature of the stuff you are comparing. Strings are not characters, and
neither the latter are bytes.

Anyway, trying to apply the same stupid science, I notice a much more
amazing fact:
24

Does Python really needs twentyfour bytes to store a *single* bit of
information?? Wow, since by definition a byte contains eight bits,
there's a factor of 192... what a shame!

:)
—————

Python seems to consider os.linesep as a
str.

True

Yes, I bet in stupid languages that would be either a single character,
or a tuple of two or more characters, much more usable and compact.
—————

PS A "mole" is not a number.

Oh, nice to know. And OOC, what is a "mole" in your stupid science?
OTOH, WTF does that matter in current thread and with Python in general?

ciao, lele.
 
M

MRAB

I'm not an expert in stupid science, and I fail to see the "common"
nature of the stuff you are comparing. Strings are not characters, and
neither the latter are bytes.

Anyway, trying to apply the same stupid science, I notice a much more
amazing fact:

24

Does Python really needs twentyfour bytes to store a *single* bit of
information?? Wow, since by definition a byte contains eight bits,
there's a factor of 192... what a shame!

:)


Yes, I bet in stupid languages that would be either a single character,
or a tuple of two or more characters, much more usable and compact.


Oh, nice to know. And OOC, what is a "mole" in your stupid science?
OTOH, WTF does that matter in current thread and with Python in general?
A "mole" is a term from chemistry:

http://en.wikipedia.org/wiki/Mole_(unit)

but I have no idea how it relates to Python or even to computers in
general.
 
T

Terry Reedy

A mole is an amount of something. Avogadro's Number is a number, which
is what I was hinting at :)

The unit for 'mole' is 'ion', 'atom', or 'molecule', as appropriate for
the 'something'. In other words, the units are the reacting input units
and resulting output units in a particular chemical reaction.
 
D

Dave Angel

Terry said:
The unit for 'mole' is 'ion', 'atom', or 'molecule', as appropriate for
the 'something'. In other words, the units are the reacting input units
and resulting output units in a particular chemical reaction.

To expand a little on that, the unit of "amount of something" is a "gram
mole", which is 6.2 **23 grams times the molecular (or atomic) weight.

My dad (research chemist) used to have to order supplies for his lab in
"ton moles", and he used some very small multipliers, since he usually
needed a kilogram or less in his lab.
 
S

Steven D'Aprano

A mole is as much a number (6e23) as the light year is a number
(9.5e15).

Not quite. A mole (abbreviation: mol) is a name for a specific number,
like couple (2) or dozen (12) or gross (144), only much bigger: 6.02e23.
And I can't believe I still remember that value :) It's normally used
only for atoms, ions or molecules, but in principle you could talk about
anything. E.g. the population of the world is a mere 1.2e-14 mol.

A light-year, on the other hand, is a dimensional quantity. Whereas mole
is dimensionless, light-year has dimensions of Length, and therefore the
value depends on the units you measure in:

1 light-year:

= 3.724697e+17 inches
= 0.30660139 parsec
= 9.4607305e+12 kilometres

etc.
 
S

Steven D'Aprano

A mole is an amount of something. Avogadro's Number is a number, which
is what I was hinting at :)

Would you consider "a dozen" to be a number? Normally we use dozen only
in reference to a dozen of something, not as an abstract pure number, but
it's still a number in a way that "light-year" (or "mile", or "gram", or
"second") is not.

Mole is like dozen. Light-year is like mile. And Avagadro's Number is
like "twelve", only a bit bigger :)
 
S

Steven D'Aprano

The unit for 'mole' is 'ion', 'atom', or 'molecule', as appropriate for
the 'something'. In other words, the units are the reacting input units
and resulting output units in a particular chemical reaction.

Careful about the use of the word "unit", you're likely to confuse people
into thinking "atom" is a unit of measurement like inches, seconds, grams
or ohms.

Naturally when dealing with moles of substance you have to take into
account the kind of substance. In much the same way it makes a difference
whether you are catering for a dozen people, a dozen couples, or a dozen
football teams, a mole of oxygen molecules is not the same as a mole of
oxygen atoms. But it's still the same number of things in each case, only
the thing differs.
 
R

Roy Smith

Steven D'Aprano said:
Not quite. A mole (abbreviation: mol) is a name for a specific number,
like couple (2) or dozen (12) or gross (144), only much bigger: 6.02e23.
And I can't believe I still remember that value :)

I remember it as 6.022e23 :)

In my high school chemistry class, there was a wooden cube, about 1/2
meter on a side, sitting on the lecture desk in the front of the room.
The only writing on it was "6.022 x 10^23". It sat there all year.

The volume of the cube was that of 1 mole of an ideal gas at STP.
A light-year, on the other hand, is a dimensional quantity. Whereas mole
is dimensionless, light-year has dimensions of Length, and therefore the
value depends on the units you measure in:

1 light-year:

= 3.724697e+17 inches
= 0.30660139 parsec
= 9.4607305e+12 kilometres

Hold your hands out in front of you, palms facing towards each other,
one shoulder-width apart. That distance is about one light-nanosecond.
 
S

Steven D'Aprano

To expand a little on that, the unit of "amount of something" is a "gram
mole", which is 6.2 **23 grams times the molecular (or atomic) weight.

The unit of amount of substance is mole. Gram-mole is an unfortunate
synonym for mole. Unfortunate, because it looks like it should have
dimensions of Mass, but it is actually a dimensionless number, and
exactly equal to mole.

As usual, we can blame the damn engineers and their sloppy, ad-hoc
thinking for abominations like this:

http://web.utk.edu/~dad/mole.html

Also, you're quoting Avogadro's Constant incorrectly: it's 6.02e23, or if
you prefer, 6.02*10**23, not 6.2**23, which is a factor of about 358581
too small.

My dad (research chemist) used to have to order supplies for his lab in
"ton moles", and he used some very small multipliers, since he usually
needed a kilogram or less in his lab.

That's just sad. The supplier won't be counting out individual molecules,
they'll be putting it on a scale and weighing it. So your dad had to
convert the desired weight into a ridiculously impractical unit to place
the order, and the supplier no doubt had to convert that unit back into
mass in order to weigh it out and supply it. If you want a kilogram of X,
why not order a kilogram of X, instead of converting it into megamol?

Sigh, I know the answer to that question. "We've always done it this way."
 
S

Steven D'Aprano

The unit of amount of substance is mole. Gram-mole is an unfortunate
synonym for mole.

Oops, dropped a word there...

The *SI unit* of amount of substance.
 
D

Dave Angel

Roy said:
I remember it as 6.022e23 :)

In my high school chemistry class, there was a wooden cube, about 1/2
meter on a side, sitting on the lecture desk in the front of the room.
The only writing on it was "6.022 x 10^23". It sat there all year.

The volume of the cube was that of 1 mole of an ideal gas at STP.


Hold your hands out in front of you, palms facing towards each other,
one shoulder-width apart. That distance is about one light-nanosecond.

Narrow shoulders.

I figure it just under a foot. I once attended a lecture by Grace
Hopper where she handed out "nanoseconds," pieces of wire about a foot
long. She said that the beaurocrats were always asking how much is a
nanosecond, and couldn't imagine what a billionth was like. So she gave
them something physical.
 
W

wxjmfauth

-----

A mole is an amount of matter measured in [kg] .
The Avogadro's number can only be a dimensionless number, [1] .
The Avogadro's constant is the Avogadro's number (of "pieces" or
"objects") per mol, [1 / mol].

A chemist has to work and is always working in mole; as his
balance can only measure a mass, the calculation mole <-> mass
is always mandatory.

Why did I put this "mole" in the post scriptum?

Because there is a tendency on this list to be extremely
confused and to compare what is not comparable (eg. comparaison
of mole and Python large number, number and radian, byte and
unicode transformation unit).

jmf
 
R

Roy Smith

A chemist has to work and is always working in mole; as his
balance can only measure a mass, the calculation mole <-> mass
is always mandatory.

That's because chemists are lazy.

The recipe says, "Add one mole of carbon atoms". So, does the chemist
follow the recipe and count out 6.022 x 10^23 atoms like he's supposed
to? No. He says, "I don't have time for that. I'll just weigh out 12
grams. Good enough for government work." Sheesh.
 
G

Grant Edwards

You have obviously never argued science with a homeopath if you believe
that knowing Avogadro's number will in any way shake their faith.

He wasn't talking about arguing with a homeopath -- he was talking
about mocking homeopathy.

If you accept the premise of homeopathy having to do with the
transferring of the essence or memory or whatever it's called, the
fact that the final "solution" contains none of the original solute is
irrelevant, and they will freely admit that none of the solute is
actually present. It's all a complete and utter scam, of course.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,779
Messages
2,569,606
Members
45,239
Latest member
Alex Young

Latest Threads

Top