• Home
  • Raw
  • Download

Lines Matching refs:dialect

95     DialectObj *dialect;    /* parsing dialect */  member
115 DialectObj *dialect; /* parsing dialect */ member
335 PyObject *dialect = NULL; in dialect_new() local
347 &dialect, in dialect_new()
358 if (dialect != NULL) { in dialect_new()
359 if (PyUnicode_Check(dialect)) { in dialect_new()
360 dialect = get_dialect_from_registry(dialect); in dialect_new()
361 if (dialect == NULL) in dialect_new()
365 Py_INCREF(dialect); in dialect_new()
367 if (PyObject_TypeCheck(dialect, &Dialect_Type) && in dialect_new()
376 return dialect; in dialect_new()
381 Py_XDECREF(dialect); in dialect_new()
394 if (dialect != NULL) { in dialect_new()
397 v = PyObject_GetAttrString(dialect, n) in dialect_new()
446 Py_XDECREF(dialect); in dialect_new()
588 DialectObj *dialect = self->dialect; in parse_process_char() local
611 else if (c == dialect->quotechar && in parse_process_char()
612 dialect->quoting != QUOTE_NONE) { in parse_process_char()
616 else if (c == dialect->escapechar) { in parse_process_char()
620 else if (c == ' ' && dialect->skipinitialspace) in parse_process_char()
623 else if (c == dialect->delimiter) { in parse_process_char()
630 if (dialect->quoting == QUOTE_NONNUMERIC) in parse_process_char()
665 else if (c == dialect->escapechar) { in parse_process_char()
669 else if (c == dialect->delimiter) { in parse_process_char()
686 else if (c == dialect->escapechar) { in parse_process_char()
690 else if (c == dialect->quotechar && in parse_process_char()
691 dialect->quoting != QUOTE_NONE) { in parse_process_char()
692 if (dialect->doublequote) { in parse_process_char()
718 if (dialect->quoting != QUOTE_NONE && in parse_process_char()
719 c == dialect->quotechar) { in parse_process_char()
725 else if (c == dialect->delimiter) { in parse_process_char()
737 else if (!dialect->strict) { in parse_process_char()
745 dialect->delimiter, in parse_process_char()
746 dialect->quotechar); in parse_process_char()
796 if (self->dialect->strict) in Reader_iternext()
852 Py_XDECREF(self->dialect); in Reader_dealloc()
863 Py_VISIT(self->dialect); in Reader_traverse()
872 Py_CLEAR(self->dialect); in Reader_clear()
891 { "dialect", T_OBJECT, R_OFF(dialect), READONLY },
936 PyObject * iterator, * dialect = NULL; in csv_reader() local
942 self->dialect = NULL; in csv_reader()
954 if (!PyArg_UnpackTuple(args, "", 1, 2, &iterator, &dialect)) { in csv_reader()
965 self->dialect = (DialectObj *)_call_dialect(dialect, keyword_args); in csv_reader()
966 if (self->dialect == NULL) { in csv_reader()
996 DialectObj *dialect = self->dialect; in join_append_data() local
1019 ADDCH(dialect->delimiter); in join_append_data()
1023 ADDCH(dialect->quotechar); in join_append_data()
1031 if (c == dialect->delimiter || in join_append_data()
1032 c == dialect->escapechar || in join_append_data()
1033 c == dialect->quotechar || in join_append_data()
1035 dialect->lineterminator, c, 0, in join_append_data()
1036 PyUnicode_GET_LENGTH(dialect->lineterminator), 1) >= 0) { in join_append_data()
1037 if (dialect->quoting == QUOTE_NONE) in join_append_data()
1040 if (c == dialect->quotechar) { in join_append_data()
1041 if (dialect->doublequote) in join_append_data()
1042 ADDCH(dialect->quotechar); in join_append_data()
1050 if (!dialect->escapechar) { in join_append_data()
1055 ADDCH(dialect->escapechar); in join_append_data()
1065 ADDCH(dialect->quotechar); in join_append_data()
1137 terminator_len = PyUnicode_GET_LENGTH(self->dialect->lineterminator); in join_append_lineterminator()
1145 term_kind = PyUnicode_KIND(self->dialect->lineterminator); in join_append_lineterminator()
1146 term_data = PyUnicode_DATA(self->dialect->lineterminator); in join_append_lineterminator()
1163 DialectObj *dialect = self->dialect; in csv_writerow() local
1179 switch (dialect->quoting) { in csv_writerow()
1221 if (dialect->quoting == QUOTE_NONE) { in csv_writerow()
1287 { "dialect", T_OBJECT, W_OFF(dialect), READONLY },
1295 Py_XDECREF(self->dialect); in Writer_dealloc()
1305 Py_VISIT(self->dialect); in Writer_traverse()
1313 Py_CLEAR(self->dialect); in Writer_clear()
1363 PyObject * output_file, * dialect = NULL; in csv_writer() local
1370 self->dialect = NULL; in csv_writer()
1378 if (!PyArg_UnpackTuple(args, "", 1, 2, &output_file, &dialect)) { in csv_writer()
1389 self->dialect = (DialectObj *)_call_dialect(dialect, keyword_args); in csv_writer()
1390 if (self->dialect == NULL) { in csv_writer()
1411 PyObject *dialect; in csv_register_dialect() local
1422 dialect = _call_dialect(dialect_obj, kwargs); in csv_register_dialect()
1423 if (dialect == NULL) in csv_register_dialect()
1425 if (PyDict_SetItem(_csvstate_global->dialects, name_obj, dialect) < 0) { in csv_register_dialect()
1426 Py_DECREF(dialect); in csv_register_dialect()
1429 Py_DECREF(dialect); in csv_register_dialect()