Senator David Leyonhjelm has asked if he is being prosecuted for being a man in a court stoush over failing to register a backyard pool.

The Liberal Democrat questioned whether or not sexism was at play in his local council’s decision to charge him, and not his wife, in relation to their Drummoyne property, in Sydney's inner west.

The 66-year-old, who made headlines this year over allegedly “slut shaming” Greens senator Sarah Hanson-Young, went as far as to say his spouse, Amanda Downes, should also be pursued for breaching the regulation.

“The house is owned by both me and my wife, but only I am being prosecuted,” Senator Leyonhjelm said outside Burwood Local Court on Thursday.