mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
You don't need global unless you're reassigning the global name :)
This commit is contained in:
parent
27639a9c3a
commit
e9b8c406d9
@ -451,12 +451,6 @@ def convert(num, unit1, unit2):
|
||||
num is the factor for the first unit. Raises UnitDataError for
|
||||
various errors.
|
||||
"""
|
||||
|
||||
global fromUnit
|
||||
global toUnit
|
||||
global types
|
||||
global unitsByType
|
||||
|
||||
fromUnit.update(unit1)
|
||||
toUnit.update(unit2)
|
||||
|
||||
@ -475,10 +469,6 @@ def units(type):
|
||||
""" Return comma separated string list of units of given type, or
|
||||
a list of types if the argument is not valid.
|
||||
"""
|
||||
|
||||
global types
|
||||
global unitsByType
|
||||
|
||||
if type in types:
|
||||
return '%s units: %s' % (type, ', '.join(unitsByType[type]))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user