Skip to content
Snippets Groups Projects
Commit a96715ca authored by inso's avatar inso
Browse files

Better syntax

parent fd58087a
No related branches found
No related tags found
No related merge requests found
......@@ -21,26 +21,25 @@ from .person import Person
from ..tools.exceptions import NoPeerAvailable
class Account(object):
'''
An account is specific to a key.
Each account has only one key, and a key can
be locally referenced by only one account.
'''
@staticmethod
def units(units, community):
return units
@staticmethod
def relative(units, community):
ud = community.dividend()
relative_value = units / float(ud)
return relative_value
referentials = {'Units': (units.__func__, '{0}'),
'UD': (relative.__func__, 'UD {0}')
class Account(object):
'''
An account is specific to a key.
Each account has only one key, and a key can
be locally referenced by only one account.
'''
referentials = {'Units': (units, '{0}'),
'UD': (relative, 'UD {0}')
}
def __init__(self, salt, pubkey, name, communities, wallets, contacts,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment