raising AssertionError in production code sucks, but I realise you're just defining the contract. Please consider adding a 'this is a bad contract' comment there and in the place raising it - otherwise future programmers may believe that the current behaviour is your /intent/.
Nice.
raising AssertionError in production code sucks, but I realise you're just defining the contract. Please consider adding a 'this is a bad contract' comment there and in the place raising it - otherwise future programmers may believe that the current behaviour is your /intent/.