![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://lemmy.dbzer0.com/pictrs/image/a18b0c69-23c9-4b2a-b8e0-3aca0172390d.png)
Online Card and Tabletop Gaming Network
Online Card and Tabletop Gaming Network
) Plesse close that parentheses
Contronym https://en.wikipedia.org/wiki/Contronym
Can someone explain what happened in 1984?
196 is a square number, the square of 14. As the square of a Catalan number, it counts the number of walks of length 8 in the positive quadrant of the integer grid that start and end at the origin, moving diagonally at each step. It is part of a sequence of square numbers beginning 0, 1, 4, 25, 196, … in which each number is the smallest square that differs from the previous number by a triangular number.
Sure, but I really like to look at this when I’m deciding on wether an open source project is worth to use, if you can see that the author is relatively active.
If you have a variable called exit
you’ve overwritten the function in that scope, and won’t be able to execute it.
e.g.
>>> exit=1
>>> exit()
Traceback (most recent call last):
File "", line 1, in
TypeError: 'int' object is not callable
>>>
This is the code (Github link):
class Quitter(object):
def __init__(self, name, eof):
self.name = name
self.eof = eof
def __repr__(self):
return 'Use %s() or %s to exit' % (self.name, self.eof)
def __call__(self, code=None):
# Shells like IDLE catch the SystemExit, but listen when their
# stdin wrapper is closed.
try:
sys.stdin.close()
except:
pass
raise SystemExit(code)
What happens is that the python repl calls __repr__
automatically on each variable/statement that you type into the repl (except assignments e.g. x = 1
).
But this basically only happens in the repl. So “executing” only exit
wouldn’t work in a python script as it is not calling __repr__
automatically, so better you learn how to do it right than using just exit
in your python scripts and scratching your head why it works in the repl but not in your code.
Where did you get that wallpaper from?
On custom roms like grapheneos you can change the domain it connects to. Om grapheneos it defaults to servers hosted by grapheneos.