IsPython really O-O?
Matt Gerrans
mgerrans at ix.netcom.com
Tue Nov 13 01:28:05 EST 2001
Tim Hammerquist <tim at vegeta.ath.cx> wrote
> If you really need to raise a discussion, the posters
> comp.lang.smalltalk...
Okay, I'm off to the smalltalk group to declare that "Python is more OO than
Smalltalk!" Who will ensure that I get a decent burial?
> $ cat debate
> #!/usr/local/bin/python
>
> assert time is infinite
> steve = Zealot(SmallTalk)
> matt = Advocate(Python)
>
> while isinstance(steve, Zealot):
> try:
> matt.argue()
> if isconvinced(steve):
> break
> pigs.fly()
> steve.say("I'm not convinced.")
> except:
> steve.say("Hah! You can't prove it!")
>
> $ chmod 700 debate
> $ debate and echo "They all lived happily ever after."
Cute, I like it! (although I don't claim to be a Python Advocate -- I
advocate using the best tool for the job, which means the more tools you know
how to use, the better your odds are).
- mfg
More information about the Python-list
mailing list