Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36417 > unrolled thread
| Started by | Kelvin Li <ltwisabc@gmail.com> |
|---|---|
| First post | 2013-01-07 23:53 -0800 |
| Last post | 2013-01-07 23:53 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Re: comparison between non-comparable objects Kelvin Li <ltwisabc@gmail.com> - 2013-01-07 23:53 -0800
| From | Kelvin Li <ltwisabc@gmail.com> |
|---|---|
| Date | 2013-01-07 23:53 -0800 |
| Subject | Re: comparison between non-comparable objects |
| Message-ID | <mailman.264.1357631637.2939.python-list@python.org> |
> 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" Sorry about that. Thanks for finding the link. > > 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..." Got it, I was confusing built-in types with built-in functions--I incorrectly thought object(), for example, returned an object of a built-in type, and was behaving differently in Python 2 and 3: object() < object() Thanks, Kelvin
Back to top | Article view | comp.lang.python
csiph-web