In Germany, it's practically legal. The law says that "In case of small amounts meant for personnal use, the judge may drop the charges." Keyword: May.
In the north it seems they're more liberal, if they find you with 5g or something, most cops will just take it away, whereas in the south, they're more conservative/strict and 5g can get in a bit of trouble. Dunno, I dont smoke weed, but seeing as anyone who wants to try or wants to smoke it, they can and will anyway, I find it quite ridiculous not to legalize it and leave the poor people alone