A visit by the Prime Minister to a Canberra school today has highlighted the strict food bans now in place at many primary schools.

Kevin Rudd attended the O'Connor Cooperative School to hear students' concerns about the environment.

At the bottom of a press release promoting the event, a statement in bold warned journalists who had eaten a banana in the past 12 hours to stay away because of allergy concerns.

The school declined to comment on the story, saying only it had an anaphylaxis free policy, as did most other schools in the ACT.

But the president of Anaphylaxis Australia, Maria Said, has described the ban as extreme.

"Certainly trying to reduce the amount of allergen at the school, if say there's a child that has a life-threatening allergy to banana, saying to children in that child's class or maybe even in the whole infant section 'please don't bring bananas into school because they're a risk', that is certainly commonplace," she said.

"But saying to people to not eat a particular food, not to eat it for breakfast or for up to 12 hours before, the bottom line is most people that go into anaphylaxis will go into anaphylaxis from ingesting the food.

"Touch reactions are generally localised and the same with breath reactions. Most times you need to actually ingest the food to cause a reaction."

Ms Said says while avoiding any anaphylaxis is paramount, the measures to control should be based on risk to the child.

"Now we don't want any reaction to occur, but it seems to me highly extreme to make that request of anybody," she said.

"If there was kissing involved, well, sure I'd want them to be cautious.

"But we're talking about school here and I think having a banana for breakfast would pose very little risk to someone at risk of anaphylaxis."

She also says while policies for managing allergies are common within schools, this type of ban is quite rare.

"There are certainly guidelines for the management of children at risk of anaphylaxis, but they do not specify what you would do as far as what strategies you put in place," she said.

"One of the many strategies is certainly to reduce the amount of the allergen, but it would be rare to find a type of school that makes this request and I would be encouraging the school to speak with the child's doctor to see if this extreme strategy was really warranted."

Australia has one of the highest levels of food allergies in the world.