• glizzyguzzler@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    15
    ·
    5 hours ago

    You can slam semicolons at the ends of lines in Python, interpreter doesn’t care

    P sure you can do multiple lines in one line by slamming semicolons too, though idr for sure and I can’t be arsed to check

  • insomniac_lemon@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 hours ago

    In a different language that uses whitespace:

    proc blank_map*:void =
     mines_placed = 0
     row8 = newseq[uint8](width); game_map = newseq[row8](height)
     row16 = newseq[int16](width); sum_map = newseq[row16](height)
     rowChar = newseq[char](width); state_map = newseq[rowChar](height)
     for h in 0.uint8..<height:
      game_map[h] = row8; sum_map[h] = row16
      state_map[h] = rowChar
    

    I’m allowed to do it, it’s allowed

    (I don’t use it a lot and I’m sure many dislike this because longer lines especially if they have less display width for whatever reason)