Skip Navigation

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/)R
Posts
0
Comments
8
Joined
11 mo. ago

  • Entrance hidden by thighs and stubble

  • exit

    Jump
  • Yup

  • exit

    Jump
  • That just gave me the idea that it would be fun to inspect exit a little.

    Which led me down this path:

     python
        
    >>> repr(exit)
    'Use exit() or Ctrl-Z plus Return to exit'
    >>> dir(exit)
    [(...), 'eof', 'name']
    >>> exit.eof, exit.name
    ('Ctrl-Z plus Return', 'exit')
    
    
      

    Okay, cool, the "Use exit() etc." blurb appears because it's the function's repr, and the string is assembled from its name and eof properties.

    Now let's try to make our own:

     python
        
    >>> exit.__class__
    <class '_sitebuiltins.Quitter'>
    >>> gtfo = exit.__class__()
    TypeError: Quitter.__init__() missing 2 required positional arguments: 'name' and 'eof'
    
    
      

    Oh Python, you shouldn't have.

     python
        
    >>> gtfo = exit.__class__("a big puff of smoke", "a sneaky skedaddle")
    >>> gtfo
    Use a big puff of smoke() or a sneaky skedaddle to exit
    
    
      

    Beauty!

  • SELL THEIR HOUSES TO WHO, JOSH? FUCKING i don't actually have anything for this

  • Hidden feature: Defines a tariff.admin.impeach function that increments a global counter and does absolutely nothing else

  • ... ist nun Eigentum der Bundesrepublik Deutschland, ja

    So viel Zeit muss sein

  • omg

    Jump
  • Quick maffs