Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36415 > unrolled thread
| Started by | Dave Angel <d@davea.name> |
|---|---|
| First post | 2013-01-08 01:03 -0500 |
| Last post | 2013-01-08 01:03 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: comparison between non-comparable objects Dave Angel <d@davea.name> - 2013-01-08 01:03 -0500
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2013-01-08 01:03 -0500 |
| Subject | Re: comparison between non-comparable objects |
| Message-ID | <mailman.262.1357625026.2939.python-list@python.org> |
On 01/08/2013 12:28 AM, Kelvin Li wrote: > The language reference says: > > "...the choice whether one object [of built-in type] is considered > smaller or larger than another one is made arbitrarily..." When quoting some online source, please give a reference link. It took me a while to find the following page with your quote in it: http://docs.python.org/3.3/reference/expressions.html <http://docs.python.org/3.3/reference/expressions.htm> in section "6.9 Comparisons" > but that seems to be Python 2 behavior; Python 3 apparently raises a > TypeError. Does the documentation need updating? > That sentence is correct in context. The bullet items there are labeled "Comparison of objects of the same type..." And the particular bullet also qualifies the type of the two objects being compared: " Most other objects of built-in types..." Earlier in the same section, it considers the case of comparing objects of DIFFERENT type. .... while the <, >, >= and <= operators raise a TypeError <http://docs.python.org/3.3/library/exceptions.html#TypeError> when comparing objects of different types that do not implement these operators for the given pair of types.... -- DaveA
Back to top | Article view | comp.lang.python
csiph-web