Op 14-06-13 10:37, Nick the Gr33k schreef: > 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? What do you mean? Internally there is no representation linked to the number, so there is nothing to be seperated. Only when a number needs to be printed, is a representation for that number built and displayed.
> What is a notation anywat? is it a way of displayment? but that would > be a represeantion then.... Yes a notation is a representation. However "represenation" is also a bit of python jargon that has a specific meaning. So in order to not confuse with multiple possible meanings for "representation" I chose to use "notation" >> 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? There is a difference between "everything we see" as you write earlier and just plain "eveything" as you write later. Python works with numbers, but at the moment it has to display such a number it has to produce something that is printable. So it will build a string that can be used as a notation for that number, a numeral. And that is what will be displayed. -- Antoon. -- http://mail.python.org/mailman/listinfo/python-list