Overloading and? was <RE: Should I prefer an external database>
staschuk at telusplanet.net
Thu Apr 24 20:00:59 CEST 2003
Quoth Andrew Dalke:
[...overloadable, short-circuiting operators...]
> Ahhh, a nit-picker, eh? :)
> Let's see. I said:
> ] There's no way to implement that behaviour in Python, so
> ] it cannot be overridden.
> I submit that a language which worked in your suggested manner
> would not be Python.
> The nit is now in your court!
Hm. I'm not sure I understand what would make such a language not
I agree, of course, that no known Python has such special __and__
and __or__ methods. But that no *known* Python works as I
suggested does not mean that no *possible* Python works thus.
(Consider that not long ago the yield statement was not part of
any known Python. And imho generators are a much larger change to
the language than two new special methods with unusual arguments.)
Steven Taschuk Aral: "Confusion to the enemy, boy."
staschuk at telusplanet.net Mark: "Turn-about is fair play, sir."
-- _Mirror Dance_, Lois McMaster Bujold
More information about the Python-list