def __init__(self, verbose_name=None, name=None,
                 max_digits=None, decimal_places=None,
                 default=None,
                 default_currency=DEFAULT_CURRENCY,
                 currency_choices=CURRENCY_CHOICES, **kwargs):
        nullable = kwargs.get('null', False)
        if default is None and not nullable:
            # Backwards compatible fix for non-nullable fields
            default = 0.0

        if isinstance(default, string_types):
            try:
                # handle scenario where default is formatted like:
                # 'amount currency-code'
                amount, currency = default.split(' ')
            except ValueError:
                # value error would be risen if the default is
                # without the currency part, i.e
                # 'amount'
                amount = default
                currency = default_currency
            default = Money(Decimal(amount), Currency(code=currency))
        elif isinstance(default, (float, Decimal, int)):
            default = Money(default, default_currency)

        if not (nullable and default is None) and not isinstance(default, Money):
            raise Exception(
                str(default) % 'default value must be an instance of Money, is: %s')

        # Avoid giving the user hard-to-debug errors if they miss required attributes
        if max_digits is None:
            raise Exception(
                'You have to provide a max_digits attribute to Money fields.')

        if decimal_places is None:
            raise Exception(
                'You have to provide a decimal_places attribute to Money fields.')

        if not default_currency:
            default_currency = default.currency

        self.default_currency = default_currency
        self.currency_choices = currency_choices
        self.frozen_by_south = kwargs.pop('frozen_by_south', False)

        super(MoneyField, self).__init__(verbose_name, name, max_digits,
                                         decimal_places, default=default,
                                         **kwargs)
dataset/ETHPy150Open django-money/django-money/djmoney/models/fields.py/MoneyField.__init__/swapped operands of `%`