City councilors agreed today to study possible zoning changes that would bar temptation from people going to substance-abuse facilities.

Councilor Lydia Edwards (East Boston, Charlestown, North End) proposed a hearing on amending a zoning code that already limits marijuana shops and dispensaries from being located within a half mile of each other to include drug- and alcohol-treatment programs.

Edwards said she voted to legalize marijuana but said it just didn't seem fair to put them right where people would be gathering to try to begin to beat an addiction.

"I'd be equally concerned about a bar or liquor store," she said.

Councilor Tim McCarthy (Hyde Park, Roslindale, Mattapan) said now is the time to do something, because the industry is so new in Massachusetts. "Once the toothpaste is out of the tube, you can't put it back in," he said.