python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
correct use of class method in django
I had studied class methods in python but never really understood its application in Djnago. My coding life was going well without the use of it. But I came across a situation where class method will ...

Reactoo
Votes: 0
Answers: 0
Why my python kept crashing when it tried to run the turtle.tracer() method in turtle module?
I was coding a Snake Game using turtle module but when I add this line into my code the turtle screen and python crashed:
turtle.tracer(0)
can somebody help me so I can complete the game? Thanks a lot...
Drownz
Votes: 0
Answers: 1
python factory method relative to the instance itself, (class method also using self as argument?)
So I have this piece of code originally,
class Foo:
def __init__(self, val:int):
self.val = val
def next(self) -> Foo:
"""
Returns:
Foo: ...
Mohanna J
Votes: 0
Answers: 1
how to use decorator in class method
how to use decorator in class method
import time
def myTimer(func, *args, **kwargs):
def wrapper():
start = time.perf_counter()
func(*args, **kwargs)
elapsed_time = time....
Mstfa Uyar
Votes: 0
Answers: 1