From 3bc83277ea2d7eb58814451da8031507136d1e9c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 24 Mar 2017 22:08:41 +0100 Subject: Use range instead of xrange. Using xrange with small values such as 5 is pointless. Also, xrange doesn't exist in python 3. --- pastepy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pastepy.py b/pastepy.py index 1b3f221..0608faa 100644 --- a/pastepy.py +++ b/pastepy.py @@ -119,7 +119,7 @@ class Paste(object): title = mp['title'].value.decode('utf-8') or None text = mp['text'].value.decode('utf-8').replace('\r', '') or None - hash = ''.join(random.choice(base62_alphabet) for x in xrange(5)) + hash = ''.join(random.choice(base62_alphabet) for x in range(5)) try: session = db.Session() -- cgit v1.2.3