Javier Candeira <jav...@candeira.com> writes:

> I have a sorted list.

What do you mean? Is this a Python builtin list that you have sorted? If
not, where did this ‘sorted_list’ come from?

> I can put in all numeric or all strs, or any type that's orderable to
> all the others:
>
> >>> sorted_list(1, 3, 5.0, 7, 6, 4, 2.0)
> [1, 2.0, 3, 4, 5.0, 6, 7]
> >>> sorted_list('a', 'c', 'e', 'd', 'b')
> ['a', 'b', 'c', 'd', 'e']
>
> But if I put in an incompatible/unorderable type, I get a TypeError:
> not comparable.

Who is “I” in all this? There are multiple points of responsibility
being discussed, and I don't know which one you're identifying with by
“I”.

-- 
 \     “Dare to be naïve.” —Richard Buckminster Fuller, personal motto |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

_______________________________________________
melbourne-pug mailing list
melbourne-pug@python.org
https://mail.python.org/mailman/listinfo/melbourne-pug

Reply via email to