Skip to content

bpo-34197: Make _csv.Dialect attributes booleans.#8440

Merged
serhiy-storchaka merged 1 commit intopython:masterfrom
serhiy-storchaka:csv-dialect-booleans
Jul 26, 2018
Merged

bpo-34197: Make _csv.Dialect attributes booleans.#8440
serhiy-storchaka merged 1 commit intopython:masterfrom
serhiy-storchaka:csv-dialect-booleans

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented Jul 24, 2018

Attributes skipinitialspace, doublequote and strict are now
booleans instead of integers 0 or 1.

https://bugs.python.org/issue34197

Attributes skipinitialspace, doublequote and strict are now
booleans instead of integers 0 or 1.
Comment thread Modules/_csv.c

#include "Python.h"
#include "structmember.h"
#include <stdbool.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdbool.h.html

How about using bool instead of char? Isn't it portable?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T_BOOL requires char. I have doubts that _Bool has always the same size and alignment as char.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense.

Comment thread Modules/_csv.c

#include "Python.h"
#include "structmember.h"
#include <stdbool.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense.

@serhiy-storchaka serhiy-storchaka merged commit 323748a into python:master Jul 26, 2018
@serhiy-storchaka serhiy-storchaka deleted the csv-dialect-booleans branch July 26, 2018 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants