<div dir="ltr"><div>When I say "coding", anyone can think about what coding
is<br>in his own daily work, but that's not my way.<br>I'll try to refine the concept: right now I'm learning,<br>if I say "coding" I refer to what I type inside<br>my file named learningpythoncode.py that,<br>
believe it or not, starts with:<br>
<br># """After the hash can go my comment.<br>That's the first thing I've learned, and it's useful since<br>this way I don't feel like as don't knowing any language<br>at all. This is part of the code that Python doesn't<br>
compute, but this isn't less code.<br><br>Since I am using the triple quotation, I can continue:<br>On the left side of the hash will go some code, not like<br>this one, but one that Python can in fact compute.<br>It seems useful to know first what am I trying to accomplish,<br>
so first I must find out what does Python is expecting from me.<br>I understand that Python works with values,<br>so on the left side of the hash, whatever one codes, must be VALUE.<br><br>Writing code that Python can compute depends entire on:<br>
VALUE having a somehow useful definition.<br>
</div><div>This definition will help me to look at my own code, recognize<br>the value in it (correctness), and let me know that I'm doing well.<br></div><div>I can always rely on Python spiting an error message but I<br>
prefer the understanding way.<br><br>I think I've found a definition for value and it seems to say<br>that is a <b>normal form</b> or element of the system which cannot be<br>reduced by rewriting any further."""</div>
<div><br>9 # """ Is my first attempt on the left side of the hash. 9 is a value<br>since it cannot be reduced by rewriting any further.<br>Same goes for the other integers 0 1 2 3 4 5 6 7 8.<br>They are values since they cannot
be reduced by rewriting any further.<br>
</div><div>Then I consider to code another value, like A, that looks like if<br>cannot
be reduced by rewriting any further but I arrived<br>to the fact that Python
doesn't consider those characters like A<br>as able to take part in its computations until I put them between<br>apostrophes or quotation marks."""<br><br>'A' # """ I put A between apostrophes and it suddenly turned to
something<br>that cannot be reduced by rewriting any further,<br>or unless that seems to me.<br>I thought: if one can turn to value anything by putting it between<br>apostrophes or quotation marks, then the trick must be in the<br>
pair of apostrophes or quotation marks.<br></div><div><br>That's how I came to the conclusion that the pair of apostrophes<br>are, in fact, the value, and that Python treats that
kind of delimiter<br>"" as a value, no matter what one puts inside it.<br><br>Seems like if 0 1 2 3 4 5 6 7 8 9 were values which cannot be<br>reduced by rewriting any further.<br><br>And that "" was another type of value since cannot be<br>
reduced by rewriting any further<br><br>This [] is value since cannot be reduced by rewriting any further.<br><br>This {} is value since cannot be reduced by rewriting any further.<br><br>This """""" is another value is value since cannot be reduced<br>
by rewriting any further.<br><br>Then seem that those customized and customizable<br>delimited values were like a bunch of new numbers with<br>a void that one can fill if necessary.<br>
</div><div><br>Then seems that there are some other cases of value<br>that doesn't match with those above.<br><br>Cases like my_variable (not int, nor str) maybe values<br>only if they are assigned to one of the above values,<br>
</div><div>or assigned to a name that was previously assigned<br></div><div>to one of the above values.<br></div><div><br>Then True and False as bool, are somehow names that are<br>assigned to a value like the ones above.<br>
</div><div>
<br></div><div>Then any other Python keyword, (def for example) comes to be a<br>built-in value since it's (so to speak) built-in<br>assigned to one of the above values, or assigned to a name<br>that was previously assigned to one of the above values.<br>
<br></div><div>This way, everything one can code in Python remains<br></div><div>value and Python doesn't spit its error messages.<br></div><div><br>Then remains the fact that I have + - * / and other values that "act" as operators.<br>
<div>According to Python they don't have a defined type, since if I type<br></div><div><br>type(+)<br><br>leads to an error."""<br></div><br></div><div>Is it possible to draw a line like this (that goes all along Python)<br>
and grasp at least "one complete aspect" of the language?<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/24 Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Citizen Kant,<br>
<br>
will you please fix your email quoting? As it is, you are plagiarizing me, by quoting me word for word without attribution or any hint that you are quoting me.<br>
<br>
Do you notice that everyone else quotes people by name, and prefixes their words with > quote marks? This is the normal standard on email. If you are using something that breaks that standard (possibly Gmail?) and cannot set it to follow the normal rules for quoting, then you are going to frustrate and annoy people, possibly to the point that they banish your emails to the "kill-file" and stop answering your questions. Harsh, but a fact of life.<br>
<br>
If you ask, I'm sure people who know more about Gmail will help you fix your settings.<br>
<br>
Thanks,<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
-- <br>
Steven<br>
<br>
______________________________<u></u>_________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br></div>