rspec for python

John Roth johnroth1 at gmail.com
Mon Aug 25 11:45:49 EDT 2008


On Aug 25, 8:58 am, Gerhard Häring <g... at ghaering.de> wrote:
> Rustom Mody wrote:
> > Is there anything equivalent to rspec for python?
>
> I had to Google to see what it is: "A Behaviour Driven Development"
> framework for Ruby.
>
> In a blog article from Ian Bicking says that it is impossible to have a
> Python port of this because Python doesn't allow you to inject methods
> into the object class and suggests Python's doctest module as an
> alternative.
>
> Have you actually used this "rspec" thing in Ruby? I always wonder with
> such things.
>
> Same with all the other hyped technologies of yesteryear. Anybody out
> there who really uses model-driven development?
>
> -- Gerhard

In this case Ian (for whom I have a great deal of respect) is simply
wrong. I know because I did it. Of course, it wasn't a port - I
implemented the underlying language of an earlier version from scratch
before I lost interest.

Injecting methods into the object class is a tactical decision. There
are a lot of things that make Ruby more suitable than Python for
writing embedded DSLs; that is only one of them. Compare Rake and
Scons - the Ruby and Python embedded DSL build systems that are
intended to replace Make, Ant and similar external build DSLs. You can
see the difference in fluency.

John Roth
Python FIT



More information about the Python-list mailing list