
from decimal import Decimal
import locale


TWO_PLACES = Decimal('.00')


def format_euro_amount(x: Decimal) -> str:
    """Return a textual representation with two decimal places,
    locale-specific decimal point and thousands separators, and the Euro
    symbol.
    """
    quantized = to_two_places(x)
    formatted_number = locale.format_string('%.2f', quantized, grouping=True,
                                            monetary=True)
    return f'{formatted_number} €'


def to_two_places(x: Decimal) -> Decimal:
    """Quantize to two decimal places."""
    return x.quantize(TWO_PLACES)


from decimal import Decimal
import locale


TWO_PLACES = Decimal('.00')


def format_euro_amount(x: Decimal) -> str:
    """Return a textual representation with two decimal places,
    locale-specific decimal point and thousands separators, and the Euro
    symbol.
    """
    quantized = to_two_places(x)
    formatted_number = locale.format_string('%.2f', quantized, grouping=True)
    return f'{formatted_number} €'


def to_two_places(x: Decimal) -> Decimal:
    """Quantize to two decimal places."""
    return x.quantize(TWO_PLACES)

Remove usage of `monetary` keyword argument again as it is not available on Python 3.6
Remove usage of `monetary` keyword argument again as it is not available on Python 3.6

  
  from decimal import Decimal
  import locale
  
  
  TWO_PLACES = Decimal('.00')
  
  
  def format_euro_amount(x: Decimal) -> str:
      """Return a textual representation with two decimal places,
      locale-specific decimal point and thousands separators, and the Euro
      symbol.
      """
      quantized = to_two_places(x)
-     formatted_number = locale.format_string('%.2f', quantized, grouping=True,
+     formatted_number = locale.format_string('%.2f', quantized, grouping=True)
-                                             monetary=True)
      return f'{formatted_number} €'
  
  
  def to_two_places(x: Decimal) -> Decimal:
      """Quantize to two decimal places."""
      return x.quantize(TWO_PLACES)
  
Remove usage of `monetary` keyword argument again as it is not available on Python 3.6
## Code Before:

from decimal import Decimal
import locale


TWO_PLACES = Decimal('.00')


def format_euro_amount(x: Decimal) -> str:
    """Return a textual representation with two decimal places,
    locale-specific decimal point and thousands separators, and the Euro
    symbol.
    """
    quantized = to_two_places(x)
    formatted_number = locale.format_string('%.2f', quantized, grouping=True,
                                            monetary=True)
    return f'{formatted_number} €'


def to_two_places(x: Decimal) -> Decimal:
    """Quantize to two decimal places."""
    return x.quantize(TWO_PLACES)

## Instruction:
Remove usage of `monetary` keyword argument again as it is not available on Python 3.6
## Code After:

from decimal import Decimal
import locale


TWO_PLACES = Decimal('.00')


def format_euro_amount(x: Decimal) -> str:
    """Return a textual representation with two decimal places,
    locale-specific decimal point and thousands separators, and the Euro
    symbol.
    """
    quantized = to_two_places(x)
    formatted_number = locale.format_string('%.2f', quantized, grouping=True)
    return f'{formatted_number} €'


def to_two_places(x: Decimal) -> Decimal:
    """Quantize to two decimal places."""
    return x.quantize(TWO_PLACES)
