removed inaccurate comparison to C

This commit is contained in:
Mark Pilgrim
2009-09-11 16:06:39 -04:00
parent 24a8c81206
commit 8307834130
+1 -1
View File
@@ -544,7 +544,7 @@ AttributeError: 'tuple' object has no attribute 'remove'</samp>
<li><var>v</var> is a tuple of three elements, and <code>(x, y, z)</code> is a tuple of three variables. Assigning one to the other assigns each of the values of <var>v</var> to each of the variables, in order.
</ol>
<p>This has all kinds of uses. I often want to assign names to a range of values. In <abbr>C</abbr>, you would use <code>enum</code> and manually list each constant and its associated value, which seems especially tedious when the values are consecutive. In Python, you can use the built-in <code>range()</code> function with multi-variable assignment to quickly assign consecutive values.
<p>This has all kinds of uses. Suppose you want to assign names to a range of values. You can use the built-in <code>range()</code> function with multi-variable assignment to quickly assign consecutive values.
<pre class=screen>
<a><samp class=p>>>> </samp><kbd class=pp>(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY) = range(7)</kbd> <span class=u>&#x2460;</span></a>