THERESA May’s support for new grammar schools was bizarre and wrong-headed.

Not only did she back a system that potentially scars some children who fail the 11-plus, but it undermined her claim to care about working class Britons.

However, while May’s policy announcement was divisive, Scottish politicians were premature in making political points about our own ‘comprehensive’ schools north of the border.

As we report today, Edinburgh presides over one of the most selective education systems in the UK. The selection is not based on academic ability, but on the size of a parent’s bank balance and a post code.

Edinburgh’s middle class parents have two options: either shell out £15,000 a year to go private, as so many do, or pay £100,000 extra for a house in a catchment that has one of city’s 'decent' secondary schools.

For everyone else, the options are limited and the outlook is grim. A placing request can be submitted, but the chances of getting into a school with good exam results are slim.

Parents on low incomes have almost no choice and the quality of their child’s education is based on something as arbitrary as where they can afford to live.

Our analysis confirms what many parents already know - the Edinburgh catchment system is rigged and the odds are stacked against children from poor backgrounds

At Firhill High, 64% of school leavers in 2014/15 lived in the top two ranked categories (the least deprived) of the 2012 Scottish Index of Multiple Deprivation. For school leavers at the Wester Hailes Education Centre, the corresponding figure was zero.

There are many ways to describe the schools in Edinburgh, but ‘comprehensive’ is not one of them. The Capital presides over a three-tier, pay-to-play selective system that disadvantages those without money.

No obvious solution exists, as parents will always be free to buy a house in a more prosperous catchment in a bid to dodge their local school if it is under performing.

However, every option should be on the table, from intensive support for struggling schools, to bigger catchments that give more pupils the opportunity of attending successful schools.

But whatever the solution, it must be built on solid analysis. Edinburgh, like many areas of England, has a system of education based on selection and wealth.