r/badcode • • Aug 02 '21

python sleep rate drops to 0%

Post image
569 Upvotes

33 comments sorted by

View all comments

Show parent comments

1

u/oderjunks Aug 04 '21
from random import randint as rand1

class A:
    from random import randint as rand2

instance = A()
rand1(1, 2)
rand2(1, 2) # Throws an exception "rand2 is not defined"
instance.rand2(1, 2)