Hacker News new | ask | show | jobs
by chrisseaton 3096 days ago
rspec’s internal DSL is based on Ruby’s multi-line anonymous functions. I don’t know how you achieve a similar design in Python where you don’t have those in the same way. How do you write the equivalent of ‘it ‘does something’ do ... end’ in Python syntax?
1 comments

This seems a good starting point https://stackoverflow.com/questions/37334668/is-there-a-pyth...

TLDR: not as nice as RSpec but close.

> not as nice as RSpec

Right, well that probably answers the question about what they thought the magic is.