spoiler

Hello world

  • 105 Posts
  • 31 Comments
Joined 1 year ago
cake
Cake day: July 8th, 2023

help-circle









  • Sjmarf@sh.itjust.worksOPtoProgrammer Humor@programming.devSus
    link
    fedilink
    arrow-up
    102
    ·
    edit-2
    2 months ago

    not() is a base function that negates what’s inside (turning True to False and vice versa) giving it no parameter returns “True” (because no parameter counts as False)

    Actually, not is an operator. It makes more sense if you write not() as not () - the () is an empty tuple. An empty tuple is falsy in Python, so not () evaluates to True.























  • I’m a developer of a Lemmy client. When you upload an image to a Lemmy instance, the instance returns a “delete token”. Later, you can ask the instance to delete the image attached to the delete token. So as long as you keep hold of the delete token for a specific image, you’re able to delete it later.

    Lemmy-ui (the official frontend) will give you the option to delete an image again shortly after uploading it. However, it’s not possible to remove the image after actually creating the post, as the delete token associated with that post isn’t remembered anywhere on the Lemmy backend.

    As for other Lemmy clients, YMMV. The client I work on (Mlem) deletes images if you remove them from a post before posting it, but has the same pitfall as Lemmy-ui in that it won’t delete the image if you’ve already created the post.

    It would be possible to locally save the delete tokens of every image you upload, so that you can request that they be removed later. I don’t know of any clients that can do this yet, though (if someone knows of one, feel free to mention it).

    Edit: clarity