Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

serhiy-storchaka
Copy link
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.
@@ -12,6 +12,7 @@ module instead.

#include "Python.h"
#include "structmember.h"
#include <stdbool.h>
Copy link
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
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
Member

Choose a reason for hiding this comment

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

make sense.

@@ -12,6 +12,7 @@ module instead.

#include "Python.h"
#include "structmember.h"
#include <stdbool.h>
Copy link
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