hi all,
is it possible to overload operator "< <"? (And other like this one,
eg "<= <=", "> >", ">= >=")
Any URL/example?
Thank you in advance, D.
--
http://mail.python.org/mailman/listinfo/python-list
dmitrey schrieb:
hi all,
is it possible to overload operator "< <"? (And other like this one,
eg "<= <=", "> >", ">= >=")
Any URL/example?
Thank you in advance, D.
http://docs.python.org/reference/datamodel.html#object.__lt__
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Aug 7, 2009 at 8:00 AM, dmitrey wrote:
> hi all,
> is it possible to overload operator "< <"? (And other like this one,
> eg "<= <=", "> >", ">= >=")
> Any URL/example?
> Thank you in advance, D.
That isn't an operator at all. Python does not support compound
comparisons like that. You
On Aug 7, 10:50 pm, Benjamin Kaplan wrote:
> That isn't an operator at all. Python does not support compound
> comparisons like that. You have to do "a > b and b > c".
You know, it costs nothing to open up a python interpreter and check
your certainty:
>>> x = 10
>>> 1 < x < 20
True
This is a _
alex23 schrieb:
On Aug 7, 10:50 pm, Benjamin Kaplan wrote:
That isn't an operator at all. Python does not support compound
comparisons like that. You have to do "a > b and b > c".
You know, it costs nothing to open up a python interpreter and check
your certainty:
x = 10
1 < x < 20
True
T
On Fri, 07 Aug 2009 08:50:52 -0400, Benjamin Kaplan wrote:
> On Fri, Aug 7, 2009 at 8:00 AM, dmitrey
> wrote:
>> hi all,
>> is it possible to overload operator "< <"? (And other like this one,
>> eg "<= <=", "> >", ">= >=")
>> Any URL/example?
>> Thank you in advance, D.
>
> That isn't an ope
Benjamin Kaplan wrote:
Python does not support compound
comparisons like that. You have to do "a > b and b > c".
Funny, my python does. This has been around a long time.
I am not certain whether 1.5.2 did it, but "chained comparisons"
have been around for a long time.
>>> 'a'< 'd' <'
On 12:50 pm, benjamin.kap...@case.edu wrote:
On Fri, Aug 7, 2009 at 8:00 AM, dmitrey
wrote:
hi all,
is it possible to overload operator "< �<"? (And other like this one,
eg "<= �<=", "> �>", ">= �>=")
Any URL/example?
Thank you in advance, D.
That isn't an operator at all. Python does not supp
On Fri, 07 Aug 2009 08:04:22 -0700, Scott David Daniels wrote:
> Benjamin Kaplan wrote:
>> Python does not support compound comparisons like that. You have
>> to do "a > b and b > c".
>
> Funny, my python does. This has been around a long time. I am not
> certain whether 1.5.2 did it, but "
On Aug 7, 7:18 am, "Diez B. Roggisch" wrote:
> alex23 schrieb:
>
>
>
>
>
> > On Aug 7, 10:50 pm, Benjamin Kaplan wrote:
> >> That isn't an operator at all. Python does not support compound
> >> comparisons like that. You have to do "a > b and b > c".
>
> > You know, it costs nothing to open up a
On Aug 7, 9:01 pm, Carl Banks wrote:
> On Aug 7, 7:18 am, "Diez B. Roggisch" wrote:
>
>
>
>
>
> > alex23 schrieb:
>
> > > On Aug 7, 10:50 pm, Benjamin Kaplan wrote:
> > >> That isn't an operator at all. Python does not support compound
> > >> comparisons like that. You have to do "a > b and b >
dmitrey wrote:
> is it possible to overload operator "< <"? (And other like this one,
> eg "<= <=", "> >", ">= >=")
No.
a < x < b
is a shortcut for
a < x and x < b
where x is of course evaluated only once.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
"Diez B. Roggisch" wrote:
> Not really. I didn't get the chaining, and Peter is right that for that
> there is no real overloading.
I'm sorry, I don't really get why overloading lt & gt isn't an answer
to the OP's question... His terminology may not have been correct but
I'm not sure why it's not
13 matches
Mail list logo