Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18514 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2012-01-05 07:38 +1100 |
| Last post | 2012-01-05 07:38 +1100 |
| 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: Typed python comparison / code analysis questions Chris Angelico <rosuav@gmail.com> - 2012-01-05 07:38 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-01-05 07:38 +1100 |
| Subject | Re: Typed python comparison / code analysis questions |
| Message-ID | <mailman.4426.1325709486.27778.python-list@python.org> |
On Thu, Jan 5, 2012 at 7:09 AM, Lucas Vickers <lucasvickers@gmail.com> wrote:
> 2) Is there a way to error when comparing variables of different types?
Yep. Use Python version 3.
>>> 1<"1"
Traceback (most recent call last):
File "<pyshell#88>", line 1, in <module>
1<"1"
TypeError: unorderable types: int() < str()
Chris Angelico
Back to top | Article view | comp.lang.python
csiph-web