• 0 Posts
  • 12 Comments
Joined 1 year ago
cake
Cake day: April 21st, 2024

help-circle
  • I mean yeah with no context that looks weird A/F, but given a couple details it’s fairly self-evident why it be like it do.

    1. Python doesn’t need a main function. It’ll just start running any top level code. This is nice for beginners learning programming because there’s no scaffolding or anything to set up. It just do the thing.
    2. python uses double underscores (usually called “dunder”) to mark “special” things. __name__ is a global variable containing the name of the current module. There’s a couple more like __file__ containing the filename of the current module.
    3. If you run a file directly __name__ gets set to "__main__". If it got set to something more sensible like "main" you couldn’t really call a file main.py without this breaking. Right now this only breaks for files called __main__.py but luck would have it that calling a file __main__.py already has a special meaning which makes these uses not clash.
    4. Sometimes you want code to only run if a module is run but not when it is imported. Checking if __name__ is set to __main__ is the easiest way to do this.

    Python for sure has a bunch of weirdness, but it all does mesh together into a rather nice programming language.







  • Nothing. Having a toggle for “legitimate interest” is nonsense. The GDPR lists some exceptions to when you need to ask for permission, these are “legitimate interests”. Things like remembering someones IP to keep track of bans is allowable without needing to ask for permission.

    Of course advertising agencies promptly went to work trying to bend the language of GDPR so they can claim they are a legitimate interest and therefore exempt. It won’t hold up in court.

    The GDPR is surprisingly strict, and a LOT of the cookie popups you see in the wild are not at all compliant. To give an example: having your “accept” and “reject” buttons a different font size is explicitly not allowed.