Completed
Push — master ( 51d889...c8777d )
by Andrew
29s
created

dict_values_to_list()   A

Complexity

Conditions 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
1
import sys
2
3
try:  # py2
4
	from urllib import urlopen
5
except ImportError:  # py3
6
	from urllib.request import urlopen
7
8
9
try:  # py2
10
	from urlparse import urlparse
11
except ImportError:  # py3
12
	from urllib.parse import urlparse
13
14
try:
15
	from urllib import quote
16
except ImportError:  # py3
17
	from urllib.parse import quote
18
19
def get_unicode(ch):
20
	if sys.version > '3':
21
		return chr(ch)
22
	else:
23
		return unichr(ch)
24
25
str_type = str if sys.version > '3' else basestring
26
27
28
def dict_values_to_list(dict):
29
	if sys.version > '3':
30
		return list(dict.values())
31
	else:
32
		return dict.values()