Skip Navigation
Using comments as arguments in python.
  • ~~It does work~~ I know it at least partially works
    class add:
         count = 0
    
         def __init__(self):
                 add.count += 1
                 self.value = add.count
         def __str__(self):
                 if self.value == 1:
                         return "3"
                 elif self.value == 2:
                         return "7"
                 else:
                         return "32"
    
    result = add()  # 1 2
    print(result)
    result = add()  # 3 4
    print(result)
    result = add()  # 3 4 5 20
    print(result)
    
  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)0T
    0t79JeIfK01RHyzo @lemmy.ml
    Posts 0
    Comments 2