(name, dialect='excel', **fmtparams)
| 470 | |
| 471 | |
| 472 | def register_dialect(name, dialect='excel', **fmtparams): |
| 473 | if not isinstance(name, str): |
| 474 | raise TypeError('"name" must be a string') |
| 475 | |
| 476 | dialect = Dialect.extend(dialect, fmtparams) |
| 477 | |
| 478 | try: |
| 479 | Dialect.validate(dialect) |
| 480 | except Exception: |
| 481 | raise TypeError('dialect is invalid') |
| 482 | |
| 483 | assert name not in _dialect_registry |
| 484 | _dialect_registry[name] = dialect |
| 485 | |
| 486 | |
| 487 | def unregister_dialect(name): |
no test coverage detected