On 14/6/2013 1:19 μμ, Cameron Simpson wrote:
On 14Jun2013 11:37, Nikos as SuperHost Support <supp...@superhost.gr> wrote:
| On 14/6/2013 11:22 πμ, Antoon Pardon wrote:
|
| >>Python prints numbers:
| >No it doesn't, numbers are abstract concepts that can be represented in
| >various notations, these notations are strings. Those notaional strings
| >end up being printed. As I said before we are so used in using the
| >decimal notation that we often use the notation and the number interchangebly
| >without a problem. But when we are working with multiple notations that
| >can become confusing and we should be careful to seperate numbers from their
| >representaions/notations.
|
| How do we separate a number then from its represenation-natation?
Shrug. When you "print" a number, Python transcribes a string
representation of it to your terminal.
>>> 16
16
So the output 16 is in fact a string representation of the number 16 ?
Then in what 16 and '16; differ to?
| What is a notation anywat? is it a way of displayment? but that
| would be a represeantion then....
Yep. Same thing. A "notation" is a particulart formal method of
representation.
Can you elaborate please?
| No it doesn't, numbers are abstract concepts that can be represented in
| various notations
|
| >>but when we need a decimal integer
| >
| >There are no decimal integers. There is only a decimal notation of the
number.
| >Decimal, octal etc are not characteristics of the numbers themselves.
|
| So everything we see like:
|
| 16474
| nikos
| abc123
|
| everything is a string and nothing is a number? not even number 1?
Everything you see like that is textual information. Internally to
Python, various types are used: strings, bytes, integers etc. But
when you print something, text is output.
Cheers,
Thanks!
--
What is now proved was at first only imagined!
--
http://mail.python.org/mailman/listinfo/python-list