
from csv import Dialect, excel, register_dialect

class excel_semikolon(Dialect):
    delimiter = ';'
    doublequote = True
    lineterminator = '\r\n'
    quotechar = '"'
    quoting = 0
    skipinitialspace = False

def patchup(dialect):
    if dialect:
        if dialect.delimiter == excel_semikolon.delimiter and \
           dialect.quotechar == excel_semikolon.quotechar:
            # walks like a duck and talks like a duck.. must be one
            dialect.doublequote = True
    return dialect

register_dialect("excel_semikolon", excel_semikolon)



from csv import Dialect, excel, register_dialect

class excel_semikolon(Dialect):
    delimiter = ';'
    doublequote = True
    lineterminator = '\r\n'
    quotechar = '"'
    quoting = 0
    skipinitialspace = False

def patchup(dialect):
    if dialect:
        if dialect.delimiter in [excel_semikolon.delimiter, excel.delimiter] and \
           dialect.quotechar == excel_semikolon.quotechar:
            # walks like a duck and talks like a duck.. must be one
            dialect.doublequote = True
    return dialect

register_dialect("excel_semikolon", excel_semikolon)


Extend patchup for builtin excel dialect
Extend patchup for builtin excel dialect

  
  from csv import Dialect, excel, register_dialect
  
  class excel_semikolon(Dialect):
      delimiter = ';'
      doublequote = True
      lineterminator = '\r\n'
      quotechar = '"'
      quoting = 0
      skipinitialspace = False
  
  def patchup(dialect):
      if dialect:
-         if dialect.delimiter == excel_semikolon.delimiter and \
+         if dialect.delimiter in [excel_semikolon.delimiter, excel.delimiter] and \
             dialect.quotechar == excel_semikolon.quotechar:
              # walks like a duck and talks like a duck.. must be one
              dialect.doublequote = True
      return dialect
  
  register_dialect("excel_semikolon", excel_semikolon)
  
  
Extend patchup for builtin excel dialect
## Code Before:

from csv import Dialect, excel, register_dialect

class excel_semikolon(Dialect):
    delimiter = ';'
    doublequote = True
    lineterminator = '\r\n'
    quotechar = '"'
    quoting = 0
    skipinitialspace = False

def patchup(dialect):
    if dialect:
        if dialect.delimiter == excel_semikolon.delimiter and \
           dialect.quotechar == excel_semikolon.quotechar:
            # walks like a duck and talks like a duck.. must be one
            dialect.doublequote = True
    return dialect

register_dialect("excel_semikolon", excel_semikolon)


## Instruction:
Extend patchup for builtin excel dialect
## Code After:

from csv import Dialect, excel, register_dialect

class excel_semikolon(Dialect):
    delimiter = ';'
    doublequote = True
    lineterminator = '\r\n'
    quotechar = '"'
    quoting = 0
    skipinitialspace = False

def patchup(dialect):
    if dialect:
        if dialect.delimiter in [excel_semikolon.delimiter, excel.delimiter] and \
           dialect.quotechar == excel_semikolon.quotechar:
            # walks like a duck and talks like a duck.. must be one
            dialect.doublequote = True
    return dialect

register_dialect("excel_semikolon", excel_semikolon)

