Could be replaced:
if fragment[0] is '#'